Question
What is the output of the following code?a={}a[2]=1a[1]=[2,3,4]print(a[1][1])
Answer: Option B
Was this answer helpful ?
Now, a={1:[2,3,4],2:1} . a[1][1] refers to second element having key 1.
Was this answer helpful ?
Submit Solution