Single Choice
Not Set
QWhich of the following is used to initialize multiple variables with a common value?
ID: #3392
Python Operator MCQ
616 views
Question Info
#3392Q ID
Not SetDifficulty
Python Operator MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
In Python, multiple variables can be initialized with the same value using
a single assignment statement. This is done by chaining the assignment
operator (=).
Example:
x = y = z = 33
print(x)
print(y)
print(z)
Output:
33
33
33
In this example, the value 33 is assigned to the variables
x, y, and z simultaneously.
The other options are incorrect because they do not follow Python's syntax for assigning the same value to multiple variables.
Therefore, the correct answer is
Option B) x = y = z = 33.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic