Skip to content

Commit 4c69bec

Browse files
committed
nested_dict.py
1 parent ee591b0 commit 4c69bec

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

nested_dict.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
student_data=[
2+
{
3+
"Name":"Ram",
4+
"roll_no":10,
5+
"age":20,
6+
"course":"Python"
7+
},
8+
{
9+
"Name":"Mohan",
10+
"roll_no":20,
11+
"age":22,
12+
"course":"Java",
13+
"phone_no":[8695757,6574]
14+
}
15+
]
16+
print(student_data[1]["phone_no"])
17+
#nesting a list in dictionary
18+
#travel_data={
19+
# "Gujrat":["Dwarkadhish","Somnath","Statue of unity"],
20+
# "Rajasthan":["Jaipur","Udaipur"]
21+
#}
22+
#print(travel_data)
23+

0 commit comments

Comments
 (0)