Source Code:
(back to article)
my_dict = {"name": "John", "age": 30} print(my_dict.get("name")) # Output: John print(my_dict.get("occupation", "Not Found")) # Output: Not Found
Result:
Report an issue