convert dict into string python code example
Example 1: convert dict to string python
my_dict = {"Hello" : True, "World" : False}
print(str(my_dict))
Example 2: convert string representation of dict to dict python
>>> import ast
>>> ast.literal_eval("{'muffin' : 'lolz', 'foo' : 'kitty'}")
{'muffin': 'lolz', 'foo': 'kitty'}