Dictionary in Python
Dictionaries are used to store data values in key:value pairs
ge
They are unordered, mutable(changeable) & don’t allow duplicate keys
le
Col
na
“key” : value
Ap
dict[”name”], dict[”cgpa”], dict[”marks”]
dict[”key”] = “value” #to assign or add new
, Dictionary in Python
Nested Dictionaries
lege
Col
pna
A
student[”score”][”math”]
Dictionaries are used to store data values in key:value pairs
ge
They are unordered, mutable(changeable) & don’t allow duplicate keys
le
Col
na
“key” : value
Ap
dict[”name”], dict[”cgpa”], dict[”marks”]
dict[”key”] = “value” #to assign or add new
, Dictionary in Python
Nested Dictionaries
lege
Col
pna
A
student[”score”][”math”]