Ju Hui wrote: > I want to print 3 numbers without blank. >>>> for x in range(3): > ... print x > ... > 0 > 1 > 2 >>>> for x in range(3): > ... print x, > ... > 0 1 2 > > how to print > 012 > ? > > thanks. >
You may want to use the write command with stdout:
sys.stdout.write("%s" % x)
using 'write' you have much more facilities to format the output...
I hope this helps
Ivan
--
http://mail.python.org/mailman/listinfo/python-list
