Удаление элементов из словаря Python с использованием метода Popitem ()
# welcome to softhunt.net
# Creating a Dictionary
Dictionary = {0: 'Softhunt', 1: '.net', 2: 'By Ranjeet', 'user': 'Greetings to you'}
print("Dictionary", Dictionary)
# Deleting a key
# using popitem() method
pop_element = Dictionary.popitem()
print('\nDictionary after deletion: ' + str(Dictionary))
print("The arbitrary pair returned is: " + str(pop_element))
Outrageous Ostrich