No newline using printf

Samuel knipknap at gmail.com
Thu Sep 15 20:37:30 EDT 2005


Hello,

I have been searching for an answer for almost two hours now and have
not found an answer. I want this code:

for i in range(3):
  print i   # or whatever

To produce this output:
012

How can I print a word without appending a newline character? Appending
a "," to the print statement only substitutes the newline for a space,
which is not what I am looking for.

Any hints?

Thanks,
-Samuel




More information about the Python-list mailing list