In previous article, we learnt about how to print elements of dictionary in python. In this article, we will learn about python program to print nested dictionary with example.
Print Nested Dictionary
Program to print nested dictionary –
people = {1: {'name': 'John', 'age': '27', 'sex': 'Male'}, 2: {'name': 'Marie', 'age': '22', 'sex': 'Female'}} print(people)