print a variable without newline or space python3 does it by print (x,end='') how to do it in python 2.5
This doesn't seem to do that
progo
2010-10-02 17:36:45
x, leaves a space
san8055
2010-10-02 17:38:41
Yeah, my fail :)
Vladimir
2010-10-02 17:39:45
+5
A:
sys.stdout.write
writes (only) strings without newlines unless specified.
>>> x = 4
>>> print x
4
>>> import sys
>>> sys.stdout.write(str(x)) # you have to str() your variables
4>>> # <- no newline
progo
2010-10-02 17:36:01