Q.

What is the output of the following program?
D = {1 : 1, 2 : '2', '1' : 1, '2' : 3}
D['1'] = 2
print(D[D[D[str(D[1])]]])

A. 2
B. 3
C. „2‟
D. KeyError
Answer» B. 3
1.6k
1
Do you find this helpful?
11

View all MCQs in

Python Programming

Discussion

Mubeena Bee
2 years ago

can you elaborate how?
0