The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #241
*a, b, c = range(5)
print(*a)
In Python 3.0, the * operator was added to the multiple assignment syntax, allowing to capture remaining items before an unpacking into a list. (treyhunner.com/2018/03/tuple-unpacking-improves-python-co...)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) October 2, 2020
*a, b, c = range(5)
print(*a)
0 1 2
1 2 3 4 5
2 3 4
It will throw a ValueError error.#python #python3 #pythonprogramming #learnpython
Question difficulty: 🔵🔵🔵🔵🔵
Similar questions: