Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #python #change #type #element #dictionary
ADD COMMENT
Topic
Name
4+2 =