title: Turn the dictionary keys into variable names with same values in Python from .mat Matlab files using scipy.io.loadmat
body: <p>I am trying to take a basic dictionary temp = {'key':array([1,2])} loaded from a .mat file with scipy.io.loadmat. Turn the keys in the Python dictionary file returned by loadmat() into variable names with values the same as the representing keys.</p>
  
  <p>So for example:</p>
  
  <pre><code>temp = {'key':array([1,2])}
  </code></pre>
  
  <p>turned into</p>
  
  <pre><code>key = array([1,2])
  </code></pre>
  
  <p>I know how to grab the keys with temp.keys(). Then grabbing the items is easy but how do I force the list of strings in temp.keys() to be variable names instead of strings.</p>
  
  <p>I hope this makes sense but this is probably really easy I just can't think how to do it.</p>
  
  <p>Cheers</p>