CBSE CS and IP

CBSE Class 11 & 12 Computer Science and Informatics Practices Python Materials, Video Lecture

What will be the output of the following code

dc1 = {}
dc1[1] = 1
dc1['1'] = 2
dc1[1.0] = 4
sum = 0
for k in dc1:
 sum += dc1[k]
print(sum)
Answer: 6

2 comments: