Report Bug

Qus

What will be the output of the following Python code?

>>> a=("Check")*3  >>> a
Qusनिम्नलिखित Python कोड का आउटपुट क्या होगा?


A. (‘Check’,’Check’,’Check’)
B. * Operator not valid for tuples
C. (‘CheckCheckCheck’)
D. Syntax error


Solution
C. (‘CheckCheckCheck’)



Explanation
Here (“Check”) is a string not a tuple because there is no comma after the element.
Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad