print is not a function

Alex Martelli aleax at aleax.it
Wed Oct 8 06:39:20 EDT 2003


Karl Scalet wrote:
   ...
> anyhow. But if one prefers list comprehension over a for
> loop because of readability (well, that's a matter of
> taste) a prt() function or equivalent would be nice :-)

...and you'd end up with a list of n copies of None as
a result to throw away... weird...!

Anyway, the 'equivalent' is sys.stdout.write('%s\n'%x).


Alex





More information about the Python-list mailing list