Using a string variable as a variable name
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1373164/how-do-i-do-variable-variables-in-python">How do I do variable variables in Python?</a>  </p>
</blockquote>



<p>I have a variable with a string assigned to it and I want to define a new variable based on that string. </p>

<pre><code>foo = "bar"
foo = "something else"   

# What I actually want is:

bar = "something else"
</code></pre>
