What a weird thing !!?

Benyang Tang btang at pacific.jpl.nasa.gov
Fri Feb 18 15:57:47 EST 2000


"Florent Ramière" wrote:
> 
> Hello,
> 
>     here is something i do not understand ...
> 
>     Let's say i want to write two strings which must display "HELLO"
>     2 solutions to this problem:
>     print "HEL" + "LO"
> 
>     or
>     print "HEL",
>     print "LO",
> 
>     But this last solutions does not work !! Python inserts a white space
> !?
> 
>     I wanted "HELLO", python give me "HEL LO" !!!!
> 
>     I certainly have missed something, could you help me on this ?
> 
> Thanks for reading this .
> Florent.

This will do:
sys.stdout.write('HEL')
sys.stdout.write('LO')



More information about the Python-list mailing list