Yeeh, I was expecting something like that. The only reason to use map() at all is for improving the performance.
That is lost when using list comprehensions (as far as I know). So, this is *no* option for larger jobs.


Andreas

Skip Montanaro wrote:

   >>> upper_list = map(string.upper, list_of_str)

   Andreas> What am I supposed to do instead?

Try

   [s.upper() for s in list_of_str]

Skip




-- http://mail.python.org/mailman/listinfo/python-list

Reply via email to