Computer Science, asked by binodkbinu, 1 month ago

what will be the output of following program: dic={"Virat":1,"Rohit":2} dic.update({Rahul":2}) print(dic)

Answers

Answered by harshvirsing55
1

\red{\boxed{Answer:-}}

dic={"Virat":1,"Rohit":2}  

dic.update({"Rahul":2})

print(dic)

\red{\boxed{\tt O u t p u t}}

{'Virat': 1, 'Rohit': 2, 'Rahul': 2}

\red{\boxed{\tt Note:-}} Your program have an error.In line 2 you forget to enclose Rahul in double quotation ("Rahul") .

I give answer after correcting the error.

\orange{\tt Hope it will} \green{\tt help you.}

Similar questions