map() question...

Paul Rubin phr-n2002b at NOSPAMnightsong.com
Mon Jan 13 03:37:00 CET 2003


"Kevin Ethridge" <kevinethridge at yahoo.com> writes:

> Why doesn't map() work with the print function?
> ie map(print, ['Have', 'a', 'great', 'day.'])

print is a statement, not a function.  Try 
  map(sys.stdout.write, ['Have ', 'a ', 'great ', 'day.\n'])




More information about the Python-list mailing list