why can't do foo = print ?
jonathan at onegoodidea.com
Sat Aug 3 11:13:46 CEST 2002
On 2/8/2002 21:00, in article 4qB29.7601$672.1692266 at news20.bellglobal.com,
"Steve Menard" <steve.menard at polyester.com> wrote:
> you may realize that "print A" is just a shortcust for
I believe it's actually a shortcut for:
If you're using a recent Python, you might also look at:
output = file( filename, 'w' )
output = sys.stdout
for i in something
print >> output, i
which I think reads better and makes it very explicit what is going on.
More information about the Python-list