Skip to content

Bug Report for python-hash-map-basics #4990

@shakeerahmedshaik

Description

@shakeerahmedshaik

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions