Ben C wrote:
> ... But this puts an extra space on the end (so did the print i,
> version above).
Actually, no (the trailing-comma prints do a funny dance).
Check it out:

     from StringIO import StringIO
     dest = StringIO()
     for i in range(10):
         print >>dest, i,
     print >>dest
     print repr(dest.getvalue())

prints:
     '0 1 2 3 4 5 6 7 8 9\n'

-- 
-Scott David Daniels
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to