lists and append, and loop iteration

Mark Krischer mkrisch at radiata.com
Wed Sep 22 18:48:01 EDT 1999


Charles G Waldman wrote:
> I would write
> 
>  dict['new_key'] = dict.get('new_key',[]) + [new_value]

thanks, that's just the kind of elegant trick i was looking for!

--mk




More information about the Python-list mailing list