[Tutor] Newbie question
Lee Cullens
leec03273 at mac.com
Tue Apr 19 03:07:41 CEST 2005
That just gives you a spacer line after your output. To see such as a
separator change it to print '*'*10
On Apr 18, 2005, at 8:55 PM, Hoffmann wrote:
> 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),
>
> print
>
> 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.
> Hoffmann
More information about the Tutor
mailing list