list中有n个值,赋值给k个变量:a1, a2, ……,ak n = k时:a1, a2, ……,ak = list n > k时:使用1式报错:ValueError: too many values to unpack n < k时:使用1式报错:ValueError: need more than "n" values to unpack 只有n >= k时才可赋值: 从下标i开始的k个元素赋给a1, a2, ..., ak: a1, a2, ..., ak =…
The problem here is that you've defined an anonymous method which returns a string but are trying to assign it directly to a string. It's an expression which when invoked produces a string it's not directly a string. It needs to be assigned to a comp…