A trivial question about print
Peter van Kampen
news at datatailors.xs4all.nl
Thu Apr 11 07:10:05 EDT 2002
Ante,
>>>print "a="+str(a)
a=1
Hth,
PterK
In article <a93oqk$jf6$1 at bagan.srce.hr>, Ante Bagaric wrote:
>Is there a way to prevent the print statement to automatically add a space
>between two objects?
>
>>>>print "a=",a
>a= 1
>
>how to make that cursed blank character dissappear?
>Other than print "a=%d" % a because it wouldnt work for iteration of prints..
>
>for i in range(5):
> print i,
>
>gives 0, 1, 2, 3, 4 and I want 0,1,2,3,4
>
>Yes, I know it's possible to circumvent this behaviour, but I'm curiuous
>whether it can be done within the print statement alone.
>
>
>
More information about the Python-list
mailing list