Suppose a dictionary D is declared as D = {1:"John”, 2:”Dev”,3:"Bob"}
which of the following is incorrect? State the reason.
(a) print(D[3]
(b) D[[1,2,3]] = “Python"
(c) D['Bob']=3
(d) print(D[3][1]
Answers
Answered by
1
Answer:
b) D[[1,2,3]]="Python"
Explanation:
can't assign a list as key
shriajamwal321:
thanku
Similar questions