List comp help

rurpy at yahoo.com rurpy at yahoo.com
Sun Jul 14 14:38:35 EDT 2013


On Sunday, July 14, 2013 12:32:34 PM UTC-6, ru... at yahoo.com wrote:
> Or more simply:
>   [(k, v or None) for k, v in my_dict.items()]

Too simply :-(  Didn't read the op carefully enough.  Sorry.



More information about the Python-list mailing list