Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'interpreter': 0.04; 'mrab': 0.05; 'python3': 0.05; 'python': 0.09; 'block.': 0.09; 'friday,': 0.09; 'if,': 0.09; 'tab': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'subject:error': 0.11; 'tutorials': 0.15; 'for,': 0.16; 'from:addr:me.com': 0.16; 'really?': 0.16; 'subject:Mac': 0.16; 'wrote:': 0.17; '(or': 0.18; 'versions': 0.20; 'written': 0.20; 'help.': 0.22; 'cc:2**0': 0.23; 'seems': 0.23; 'cc:no real name:2**0': 0.24; 'feature': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'guess': 0.27; "doesn't": 0.28; 'feature,': 0.29; 'indentation': 0.29; "i'm": 0.29; 'maybe': 0.29; 'usually': 0.30; 'thursday,': 0.30; 'basic': 0.30; 'code': 0.31; 'etc.)': 0.32; 'print': 0.32; "aren't": 0.33; 'tutorial': 0.33; 'received:google.com': 0.34; 'thanks': 0.34; 'community': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'explain': 0.36; "didn't": 0.36; 'moment': 0.37; 'rather': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'instead': 0.39; 'help': 0.40; 'your': 0.60; 'below,': 0.60; 'further': 0.61; 'thomas': 0.62; 'great': 0.64; 'here': 0.65; 'choose': 0.65; 'press': 0.71; 'discovered': 0.83 Newsgroups: comp.lang.python Date: Fri, 29 Jun 2012 08:58:57 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=81.96.195.171; posting-account=1lcE3woAAAB8YdS7bHcWjAZeCDFa_kp3 References: <871ukzs5rx.fsf@gmail.com> <7e3890e4-3225-47f1-99e8-e5574c6413ef@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 81.96.195.171 MIME-Version: 1.0 Subject: Re: Re Following syntax error in Mac OX10.7 Terminal From: David Thomas To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1340985541 news.xs4all.nl 6863 [2001:888:2000:d::a6]:49635 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:24661 On Friday, June 29, 2012 4:21:56 PM UTC+1, MRAB wrote: > On 29/06/2012 16:13, David Thomas wrote: > > On Thursday, June 28, 2012 6:30:42 PM UTC+1, Sergi Pasoev wrote: > >> You just have to consider that indentation matters in Python, so you > >> have to type the code in Python interpreter as you have written it > >> below, that is, press Tab before each line when you are inside the > >> 'while (or any other like for, if, with, etc.) block. > >> > >> a=0 > >> while a<10: > >> a=a+1 > >> print a > >> > >> I can guess from your message that you aren't aware of one very > >> important Python feature, and maybe you also didn't willingly choose to > >> learn Python2 instead of Python3 ? In this case I would advise you to > >> consider both versions before choosing. > > > > Hi yeah I'm currently learning python 2 at the moment and the tutorial that > > I am studying doesn't explain about indentation. > > > Really? Indentation is a basic feature of Python! while {condition that the loop continues}: {what to do in the loop} {have it indented, usually four spaces} {the code here is not looped} {because it isn't indented} Just discovered this in the tutorial further down. I'm currently learning Python 2 because there seems to be a lot of tutorials out there covering Python 2 rather than 3. Thanks for the help this community is great for help.