map() question...

Paul Rubin phr-n2002b at NOSPAMnightsong.com
Sun Jan 12 21:37:00 EST 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