d = {12345: 54321, 87654: 45678} keys_values = d.items() new_d = {str(key): str(value) for key, value in keys_values} print(new_d)