Examveda

What will be the output of the following Python code?
count={}
count[(1,2,4)] = 5
count[(4,2,1)] = 7
count[(1,2)] = 6
count[(4,2,1)] = 2
tot = 0
for i in count:
    tot=tot+count[i]
print(len(count)+tot)

A. 25

B. 17

C. 16

D. Tuples can't be made keys of a dictionary

Answer: Option C


This Question Belongs to Python Program >> Dictionary In Python

Join The Discussion

Related Questions on Dictionary in Python