Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding popitem to dictionaries notebook #14

Open
sarithdm opened this issue Jul 16, 2020 · 0 comments
Open

Adding popitem to dictionaries notebook #14

sarithdm opened this issue Jul 16, 2020 · 0 comments

Comments

@sarithdm
Copy link

@sarithdm sarithdm commented Jul 16, 2020

I suggest you add this popitem also in dictionaries

my_dict = dict(food='ham', drink='beer', sport='football')
print('dict before pops: {}'.format(my_dict))

result = my_dict.popitem()
print('Result: {}'.format(result))
print('dict after popping items: {}'.format(my_dict))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.