map() question...

Mike Meyer mwm at mired.org
Mon Jan 13 03:24:08 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.'])

Because print isn't a function, it's a statement. It will work with
sys.stdout.write.

        <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.




More information about the Python-list mailing list