What is the best way to remove an item from a dictionary by value, i.e. when the item\'s key is unknown? Here\'s a simple approach:
for key, item in some_di
a = {'name': 'your_name','class': 4} if 'name' in a: del a['name']