Computer Science, asked by sayeedahamed, 3 months ago

What is the output of the following? d = {"name": "Priya", "salary": 12000) t= d.get("address") print(t)​

Answers

Answered by allysia
1

Answer:

Error since the ending of your dictionary is ended with a small bracket.

I you correct that to :

\\\tt d = \{ "na me": "Priya", "salary": 12000\} \\\tt t= d.get("address") \\\tt print(t)

The output should be :

None

Explanation:

d.get("a") returns the values from dictionary d with key "a" , since there's no such key  and hence None is returned.

Similar questions