Depricated String Functions in Python

Duncan Booth duncan.booth at invalid.invalid
Thu Jul 20 09:36:07 EDT 2006


Anoop wrote:

> let me be more specific how would i have to write the following
> function in the deprecated format
> 
> map(string.lower,list)

What you just wrote is the deprecated format.

There are plenty of ways to write it in an undeprecated format. The 
simplest is probably:

    [ s.lower() for s in list ]




More information about the Python-list mailing list