sub = {}
for a, b in sub: #<--- error occurs here
for s in b:
#do blah. I was told a b is a list
and it gives me TypeError: unpack non-sequence
What is this mean?
sub = {}
for a, b in sub: #<--- error occurs here
for s in b:
#do blah. I was told a b is a list
and it gives me TypeError: unpack non-sequence
What is this mean?
Are you looking for this?
for a, b in sub.iteritems():
# Do Something.
Doing
for a, b in sub:
#...
tries to assign (a, b)
to a key in sub
which may not be a sequence.