what will be the output of following program: dic={"Virat":1,"Rohit":2} dic.update({Rahul":2}) print(dic)
Answers
Answered by
1
dic={"Virat":1,"Rohit":2}
dic.update({"Rahul":2})
print(dic)
{'Virat': 1, 'Rohit': 2, 'Rahul': 2}
Your program have an error.In line 2 you forget to enclose Rahul in double quotation ("Rahul") .
I give answer after correcting the error.
✨
Similar questions