python change dict key's name code example
Example 1: modify dict key name python
a_dict[new_key] = a_dict.pop(old_key)
Example 2: python change dictionary key
dictionary[new_key] = dictionary[old_key]
del dictionary[old_key]
a_dict[new_key] = a_dict.pop(old_key)
dictionary[new_key] = dictionary[old_key]
del dictionary[old_key]