mapping None values to ''

Roberto Bonvallet rbonvall at gmail.com
Sun Jun 18 17:00:54 EDT 2006


imho <certo at comeno.it>:
> map(lambda x:"" , [i for i in [a,b,c] if i in ("None",None) ])

You don't need map when using list comprehensions:

    ["" for i in [a, b, c] if i in ("None", None)]

-- 
Roberto Bonvallet



More information about the Python-list mailing list