Question #309

What is the output of the code snippet below?
a, b = [1, 2, 3]
print(b)

It will throw a ValueError error. When unpacking values, the number of variables on the left side must exactly match the number of values on the right side iterable, unless the * operator is used. (stackabuse.com/unpacking-in-python-beyond-parallel-assign...)


Comment on Disqus:

Comment on Twitter:

Question difficulty: 🔵🔵🔵🔵🔵