I'm new to Python. When I try to run the following program with
a3=DictAdder()
a3.add({1:1},{2:2}}
I get the "iteration over non-sequence" error.
class DictAdder:
def add(self, x, y):
dict={}
for k in x.keys(): dict[k]=x[k]
for k in y.keys(): dict[k]=y[k]...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.