On Thu, 25 May 2006, Kent Johnson wrote: > Yes, this is a feature of print, it always inserts a newline.
Well, you can get rid of the newline by ending with a comma, but it still will insert spaces: >>> for ch in "abc": ... print ch ... a b c >>> for ch in "abc": ... print ch, ... a b c >>> I recall a way to get around that, too, but don't remember what it was. Your suggestion: > To avoid this, use sys.stdout.write() instead of print: Is the cleanest way to go, rather than arm-wrestling with "print". _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor