It took me some time to figure out what exactly my_dict.pop("key", None) is doing. So I'll add this as an answer to save others Googlinggoogling time:
pop(key[, default])If key is in the dictionary, remove it and return its value, else return default. If default is not given and key is not in the dictionary, a
KeyErroris raised.