I have the following dictionary:
dic={} dic["var1"]=val1 dic["var2"]=val2
Now I have another object that contains two properties: var1 and var2 . I would like to run a loop in an object method such as (pseudocode):
for key, value in dic self.key=value
so that self.var1=val2 and self.var2=val2
How can I implement it in python?
Meir
source share