0
sub = {} 
for a, b in sub:                   #<--- error occurs here
   for s in b:
       #do blah. I was told a b is a list

它给了我TypeError: unpack non-sequence

这是什么意思?

4

1 回答 1

4

你在找这个吗?

for a, b in sub.iteritems():
    # Do Something.

正在做

for a, b in sub:
    #...

尝试分配(a, b)sub可能不是序列的键。

于 2013-07-24T16:43:03.743 回答