Looping through dictionary to insert value to an object
<p>Consider I have the following dictionary:</p>

<pre><code>dic={}
dic["var1"]=val1
dic["var2"]=val2
</code></pre>

<p>Now I have another object which contains two properties: <code>var1</code> and <code>var2</code> .
I would like to run a loop within the object's method such as (pseudo code):</p>

<pre><code>for key, value in dic
  self.key=value
</code></pre>

<p>so that <code>self.var1=val2</code> and <code>self.var2=val2</code></p>

<p>How can I implement it in python?</p>

<p>Meir</p>
