Answers for "python change type of every element in a dictionary"

0

python change type of every element in a dictionary

d = {12345: 54321, 87654: 45678}

keys_values = d.items()

new_d = {str(key): str(value) for key, value in keys_values}

print(new_d)
Posted by: Guest on January-28-2021

Code answers related to "python change type of every element in a dictionary"

Python Answers by Framework

Browse Popular Code Answers by Language