About Lesson
Nested Dictionary:-
Syntax:- {key:value, key:value, key:{key:value, key:value…….}}
student={‘reg’:14591,’name’:’ankit’,2:{‘reg’:14590,’name’:’sunil’}}
print(student) # {‘reg’: 14591, ‘name’: ‘ankit’, 2: {‘reg’: 14590, ‘name’: ‘sunil’}}
print(student[‘reg’]) # 14591
print(student[‘name’]) # ankit
print(student[2]) # {‘reg’: 14590, ‘name’: ‘sunil’}
print(student[2][‘reg’]) # 14590
print(student[2][‘name’]) #sunil