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 #946
x = 2
x *= x *= x
print(x)
In Python, assignments cannot be chained. (python-reference.readthedocs.io/en/latest/docs/operators/...)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) August 26, 2021
x = 2
x *= x *= x
print(x)
8
It will thrown a SyntaxError exception.
4
π Comment the answer, like and retweet! #python
Question difficulty: π΅π΅π΅π΅π΅
Similar questions: