Source Code:
(back to article)
my_dict = {"name": "John", "age": 30, "city": "New York"} del my_dict["age"] # Removing an item using del keyword my_dict.pop("city") # Removing an item using pop method
Result:
Report an issue