title: How do I convert a string back to frozenset?
body: <p>I am using dictionary d as the keys to dictionary dd. To do so, I convert the keys of dd to  frozensets. I need to store dd in a txt file, so I convert the frozenset keys to strings; with the resulting dictionary being "new". I then json encode "new". </p>
  
  <p>How do I convert "new" back to a dictionary and convert the keys back to frozensets? (If there is a better way than using frozensets and json then I'd love to hear it).</p>
  
  <pre><code>new = {}
  d = {'key1':'value1'}
  dd = {frozenset(d.items()):'my_value'}
  for k,v in dd.iteritems(): 
    new[str(k)] = v
  new = json.dumps(new)
  
  newest = json.loads(new)
  for k,v in newest.iteritems():
    print frozenset(k)
  
  ### result ###
  frozenset([' ', "'", ')', '(', ',', '1', '[', ']', 'a', 'e', 'f', 'k', 'l', 'o', 'n', 's', 'r', 'u', 't', 'v', 'y', 'z'])
  </code></pre>