print without intervening space

E

Ernie

Hi,
.... print x,
....

will output

0 1 2 3 4 5 6 7 8 9
What if somebody wants instead

0123456789

Maybe we need a printns (print with no spaces) ?

Ernie
 
I

Irmen de Jong

You forgot a ':' there...
... print x,
...

will output

0 1 2 3 4 5 6 7 8 9


What if somebody wants instead

0123456789

No problem:
.... sys.stdout.write(str(x))
....
0123456789>>>


--Irmen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,100
Messages
2,570,633
Members
47,239
Latest member
LorrineHor

Latest Threads

Top