Discussion :: Python MCQs
-
What is the output of the following piece of code when executed in Python shell?a=("Check")*3a
A.
('Check','Check','Check')
|
B.
* Operator not valid for tuples
|
C.
('CheckCheckCheck')
|
D.
Syntax error
|
Answer : Option C
Explanation :
Here ("Check) is a string not a tuple because there is no comma after the element.
Be The First To Comment