Dynamically create variables inside function
<p>I want to create variables inside function from dictionary.</p>

<p>Lets say I have a dictionary</p>

<pre><code>bar = {'a': 1, 'b': 2, 'c': 3}
</code></pre>

<p>and function</p>

<pre><code>def foo():
  pass
</code></pre>

<p>What I want to do is to create inside function "foo" variables with names of each dictionary item name and values as dictionary item values</p>

<p>So in the end it should be similar to</p>

<pre><code>def foo():
  a = 1
  b = 2
  c = 3
</code></pre>

<p>Is it possible at all? And if it does, how to do such thing?</p>
