Files
Python-for-Geeks/Chapter6/dictionary/dictionary3.py
T
2021-03-13 19:25:45 +04:00

11 lines
238 B
Python

# dictionary3.py
dict1 = {100:{'name':'John', 'age':24},
101:{'name':'Mike', 'age':22},
102:{'name':'Jim', 'age':21} }
print(dict1.get(100))
print(dict1.get(100).get('name'))
print(dict1[101])
print(dict1[101]['age'])