title: Names of objects in a list?
body: <p>I'm trying to iteratively write dictionaries to file, but am having issues creating the unique filenames for each dict.</p>
  
  <pre><code>def variable_to_value(value):
      for n, v in globals().items():
          if v == value:
              return n
      else: 
          return None
  
  a = {'a': [1,2,3]}
  b = {'b': [4,5,6]}
  c = {'c': [7,8,9]}
  
  for obj in [a, b, c]:
      name = variable_to_value(obj)
      print(name)
  </code></pre>
  
  <p>This prints:</p>
  
  <pre><code>a
  obj
  obj
  </code></pre>
  
  <p>How can I access the name of the original object itself instead of <code>obj</code>? </p>