[Tutor] Dictionary Inserts...

Eric Culpepper eculpepper at hcc-care.com
Thu May 5 17:50:26 CEST 2005


Here's some quick examples:
>>> dictMe = {}
>>> dictMe['SomeKey'] = 'SomeValue'
>>> dictMe
{'SomeKey': 'SomeValue'}
>>> dictMe[1] = 100
>>> dictMe
{1: 100, 'SomeKey': 'SomeValue'}
>>> type(dictMe)
<type 'dict'>

Section 5.5 of the Python tutorial covers dictionaries a little more in depth.
http://docs.python.org/tut/node7.html



-----Original Message-----
From: tutor-bounces at python.org [mailto:tutor-bounces at python.org]On
Behalf Of Allen John Schmidt, Jr.
Sent: Thursday, May 05, 2005 10:37 AM
To: tutor at python.org
Subject: [Tutor] Dictionary Inserts...


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!
_______________________________________________
Tutor maillist  -  Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor


More information about the Tutor mailing list