print is not a function
Karl Scalet
news at yebu.de
Wed Oct 8 05:32:20 EDT 2003
More information about the Python-list mailing list
Wed Oct 8 05:32:20 EDT 2003
- Previous message (by thread): Calling DLLs from Python [Windows]
- Next message (by thread): print is not a function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
quite often there is a need to just print out the items of a list.
[ prt(x) for x in my_list ]
that would be nice, except prt() does not exist, and print is a
statement not a function, hence cannot replace prt as of above.
I don't like to write d
def prt(x):
print x
beforehand and any lambda construct would not be so handy.
It should be a short one-liner.
Any ideas?
Karl
- Previous message (by thread): Calling DLLs from Python [Windows]
- Next message (by thread): print is not a function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list