print foo, adds a space to beginning of next line?

George Young gry at
Wed Jun 6 20:59:04 CEST 2001

[python 2.1, intel linux]
def f():
     print 'what is your name: ',
     print 'what is your age: ',

what is your name: mememe
 what is your age: 48

Why does it print a space at the beginning of the second line?

If I use sys.stdout.write('what is your name: ') instead, it
works fine.

Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]

More information about the Python-list mailing list