replace key and value in dictionary python at that position code example Example: modify dict key name python a_dict[new_key] = a_dict.pop(old_key)