convertir dict a string python
my_dict = {"Hello" : True, "World" : False}
print(str(my_dict))
TheProgrammer
my_dict = {"Hello" : True, "World" : False}
print(str(my_dict))
>>> D1={'1':1, '2':2, '3':3}
>>> s=str(D1)
>>> import ast
>>> D2=ast.literal_eval(s)
>>> D2
{'1': 1, '2': 2, '3': 3}
dict = str(dict)