Python-Quizzes | Python Dictionary Quiz | Question 2

Last Updated :
Discuss
Comments

Find the output of the following program:

Python
d = {1 : 1, 2 : '2', '1' : 1, '2' : 3} 
d['1'] = 2
print(d[d[d[str(d[1])]]]) 

2

3

\'2\'

KeyError

Share your thoughts in the comments