data = [1, 2]
a, b, c = data
print(a, b, c)ValueError: not enough values to unpack (expected 3, got 2)
data = [1, 2]
a, b = data
print(a, b)I expected more values than the list actually had.
- Related case: https://pyai.io/en/python/basic/lists/
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
data = [1, 2]
a, b, c = data
print(a, b, c)ValueError: not enough values to unpack (expected 3, got 2)
data = [1, 2]
a, b = data
print(a, b)I expected more values than the list actually had.