title: Converting string to dict?
body: <p>I have a script that changes a dict to a string and saves it to a file. I'd like to then load that file and use it as a dict, but it's a string. Is there something like <code>int("7")</code> that can change a string formatted as a dict (<code>{a: 1, b: 2}</code>) into a dict? I've tried <code>dict()</code>, but this doesn't seem to be what it does. I've heard of some process involving JSON and <code>eval()</code>, but I don't really see what this does. The program loads the same data it saves, and if someone edits it and it doesn't work, it's no problem of mine (I don't need any advanced method of confirming the dict data or anything).</p>