Examveda

What will be the output of the following Python code?
a={}
a[2]=1
a[1]=[2,3,4]
print(a[1][1])

A. [2,3,4]

B. 3

C. 2

D. An exception is thrown

Answer: Option B


This Question Belongs to Python Program >> Dictionary In Python

Join The Discussion

Related Questions on Dictionary in Python