Skip to content

Commit b1d0ca5

Browse files
authored
Create dictionary_python.py
1 parent b6f72de commit b1d0ca5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

dictionary_python.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
my_dict = {"name":"shreyash","age":22,"Degree":"BE","l":[1,2,3,4]}
2+
x = my_dict.keys()
3+
print(x)
4+
#add new key value pair
5+
my_dict["college"]="SBPCOE"
6+
print(x)
7+
8+
# O/P
9+
# dict_keys(['name', 'age', 'Degree', 'l'])
10+
# dict_keys(['name', 'age', 'Degree', 'l', 'college'])
11+
12+

0 commit comments

Comments
 (0)