
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create nested Python dictionary?
A dictionary object is mutable. Hence one dictionary object can be used as a value component of a key. So we can create a nested dictionary object another dictionary object is defined as value associated with key.
>>> students={"student1":{"name":"Raaj", "age":23, "subjects":["Phy", "Che", "maths"],"GPA":8.5},"student2":{"name":"Kiran", "age":21, "subjects":["Phy", "Che", "bio"],"GPA":8.25}}
- Related Questions & Answers
- How to sort a nested Python dictionary?
- Python - Convert flattened dictionary into nested dictionary
- Python Convert nested dictionary into flattened dictionary?
- How to recursively iterate a nested Python dictionary?
- How to count elements in a nested Python dictionary?
- Python Pandas - Convert Nested Dictionary to Multiindex Dataframe
- How to create a dictionary in Python?
- Convert Nested Tuple to Custom Key Dictionary in Python
- How to create Python dictionary from the value of another dictionary?
- How to create an empty dictionary in Python?
- How to create Python dictionary by enumerate function?
- How to create Python dictionary with duplicate keys?
- How to create Python dictionary from JSON input?
- How to access nested Python dictionary items via a list of keys?
- Python - Convert list of nested dictionary into Pandas Dataframe
Advertisements