Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdding popitem to dictionaries notebook #14
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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))