-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Description
Bug Report for https://neetcode.io/problems/python-hash-map-basics
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
The might be a simple typo error. But just to make it clean, pls update it....
In the below Deletion example, my_dict.pop('b') # {} - this will return the value '2'. Pls update this line to my_dict.pop('b') # 2
my_dict = {'a': 1, 'b': 2}
del my_dict['a'] # {}
my_dict.pop('b') # {} >>>>> Correct this line to my_dict.pop('b') # 2
my_dict.pop('c') # KeyError: 'c'
my_dict.pop('c', 'default') # No error, returns 'default'
Metadata
Metadata
Assignees
Labels
No labels