Source Code:
(back to article)
my_dict = {'apple': 1, 'banana': 2, 'orange': 3} my_dict['pear'] = my_dict.pop('banana') print(my_dict) # {'apple': 1, 'pear': 2, 'orange': 3}
Result:
Report an issue