【Python】小问题:too many values to unpack

问题重现

first, second = [1, 2, 3]

print(first, second, third)

原因

序列解包时,被赋值变量个数应该与被解包变量的元素个数一致

解决

first, second, third = [1, 2, 3]

print(first, second, third)

你可能感兴趣的:(后端,Python,python,开发语言,后端,bug)