What is the output of the following code?
dict 1={
dict 1["x"]=[5]
print (dict 1["x"][5])
a) 5
b) [5]
co
d) The code generates an error
Answers
Answered by
8
Answer:
d)The code generates an error
Explanation:
Because dict1 is initialised with only an opening curly brace..
If it was correct, even then the code produces an error because the key value is out of range
Similar questions