A missing dictionary key
Take your time, follow the code and check your understanding.
The codeDictionaries
user = {"name": "Asha"}
print(user.get("city", "Unknown"))Your answer3 min · no timer
Show solution and explanation
dict.get returns the supplied fallback when the key does not exist.
Unknown