too many values to unpack
这种错误是指一个tuple值赋给一个tuple变量时,变量个数不够造成的。如:
a, b = (1, 2, 3)
for example: if ditc_a is dict, following code will get this error
for key, value in ditc_a:
...
Correct:
for key, value in ditc_a.items():
...
too many values to unpack
这种错误是指一个tuple值赋给一个tuple变量时,变量个数不够造成的。如:
a, b = (1, 2, 3)
for example: if ditc_a is dict, following code will get this error
for key, value in ditc_a:
...
Correct:
for key, value in ditc_a.items():
...