creation
d = {"server":"mpilgrim", "database":"master"}
get value of a key
d["database"] # value is 'master'
modify a key value
d["database"] = "pubs" # this dictionary becomes {'server': 'mpilgrim', 'database': 'pubs'}
add new mapping
d["uid"] = "sa" # the uid is a new key, dictionary becomes {'server': 'mpilgrim', 'uid': 'sa', 'database': 'pubs'}
delete
delete a particular mapping: del d[key]. Ex: del d["database"]
delete all mappings: d.clear()
note*: the value can be any type in a same dictionary, and key can be several type too, though key i s restricted to some specific types such as string, number etc.
Reference: http://www.diveintopython.net/native_data_types/index.html#d0e5174