[Tutor] Newbie question

Hoffmann oasf2004 at yahoo.com
Tue Apr 19 02:55:10 CEST 2005

Hi All:

I am a newbie, and I am enjoying to study Python a
lot. I have a question about an example I got from one
of my books.
The program is:

def square(y):
   return y * y

for x in range(1, 11):
   print square(x),


Well, I understood the code above. My question is: Is
it really necessary I have the last "print" statment
(last line) in the code?
Thanks a lot in advance.

Do you Yahoo!? 
Plan great trips with Yahoo! Travel: Now over 17,000 guides!

More information about the Tutor mailing list