[Tutor] Curious, just being curious
Lloyd Hugh Allen
lha2@columbia.edu
Thu, 31 Jan 2002 20:59:47 -0500
James M Lang wrote:
>
> In the online tutorial it showed examples like this:
> a = 3
> Is it really necessary for those spaces?
>
> _______________________________________________
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
Nope. Some people think those spaces make code easier to read. Others
think the spaces make code less easy to read. Check out
<http://python.sourceforge.net/peps/pep-0008.html>.
Now if it were the line
a = 3
then the spaces BEFORE the 'a' (that is, the indentation of the line)
would probably be significant--if you're new, compare the output of
for foo in range(5)
print "whee!"
print "done, I'm out of the loop"
to that of
for foo in range(5)
print "whee!"
print "I'm still in the loop!"