We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3dfdaaa commit 5d4e9efCopy full SHA for 5d4e9ef
Delete.py
@@ -0,0 +1,19 @@
1
+#Q. 73:
2
+
3
+#Delete(Dictionary)
4
5
+#Write a program to delete the key and value of the Dictionary.
6
+#Define the dictionary in the program as follows
7
+#The Dictionary is as follows
8
+#dict = {2:4,3:9,4:16,5:25}
9
+#Input:
10
+#1. Get the key that needs to be deleted
11
+#Refer sample input and output for formatting specification.
12
+#All float values are displayed correct to 2 decimal places.
13
+#All text in bold corresponds to input and the rest corresponds to output
14
15
16
+dict = {2:4,3:9,4:16,5:25}
17
+k = int(input())
18
+del dict[k]
19
+print(dict)
0 commit comments