print is not a function
news at yebu.de
Wed Oct 8 12:22:12 CEST 2003
Gonçalo Rodrigues wrote:
> On Wed, 08 Oct 2003 11:32:20 +0200, Karl Scalet <news at yebu.de> wrote:
>>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
>> print x
>>beforehand and any lambda construct would not be so handy.
>>It should be a short one-liner.
> How about,
I came across this, but this requires an extra import sys
which not always is there, thanks anyhow.
More information about the Python-list