[Tutor] trouble with indents

adam urbas adamurbas at hotmail.com
Mon May 28 06:24:03 CEST 2007


Thanks for the clarification, but I'm still a tad confused.  I'm not sure when to indent.  I understand that it has to be done.  That link was really confusing.  Very newb non-friendly.  Arrg... That site is doom.  So confusing.  I need somewhere to start from the beginning.  This site uses all kinds of big words and doesn't explain things in a clear manner.  Oh well.  Thanks for the help, though.Au> From: pine508 at hotmail.com> To: tutor at python.org> Date: Thu, 24 May 2007 15:30:34 -0400> Subject: Re: [Tutor] trouble with if> > >I'm not sure what the whole indentation thing is for.  And now I'm having > >trouble with the if statement things.> > Maybe your if statement troubles have been solved by others by now, but I'll > just add that "the indentation thing" is a vital feature of Python, it is > the way to separate code blocks.  Other languages uses other means, like > curly braces, etc.  I get the sense those who like Python enjoy indentation > because it forces the code to be quite readable, and I agree.  See this:> > http://www.diveintopython.org/getting_to_know_python/indenting_code.html> > Also, as mentioned previously, keep in mind that 2 is not the same as "2" > and "=" is not the same as "==".  The single "=" is used to assign names to > objects, whereas the == is for evaluating something, so for if statements > use == and not =.  Also note you can put "and" along with if, so you can say> > if x == "mom" and y == "dad":>     print "my parents"> > and lots of other stuff.> -Che> > _________________________________________________________________> PC Magazine’s 2007 editors’ choice for best Web mail—award-winning Windows > Live Hotmail. > http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_pcmag_0507> 
_________________________________________________________________
Create the ultimate e-mail address book. Import your contacts to Windows Live Hotmail.
www.windowslive-hotmail.com/learnmore/managemail2.html?locale=en-us&ocid=TXT_TAGLM_HMWL_reten_impcont_0507
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070527/3d9776c6/attachment.htm 


More information about the Tutor mailing list