DATA = {'spam': 'eggs', 'foo': True, 'bar': {'baz': 97}}
print(DATA)
STRING_DATA = dict([(str(k), v) for k, v in list(data.items())])
print(STRING_DATA)
Fastest way to convert a dict's keys & values from `unicode` to `str`?