[Tutor] Dictionary Inserts...

André Roberge andre.roberge at gmail.com
Thu May 5 17:48:16 CEST 2005


Allen John Schmidt, Jr. wrote:
> Ok, I have had enough. I have looked all through the python docs and I 
> cannot find it. How do you insert an entry into a dictionary?
> 
> Thanx!
> 

 >>> my_dict = {}
 >>> my_dict['new_entry'] = ['simple', 'as', 1, 2, 3]
 >>> my_dict
{'new_entry': ['simple', 'as', 1, 2, 3]}



More information about the Tutor mailing list