Home / CSE MCQs / Python MCQs :: Discussion

Discussion :: Python MCQs

  1. What is the output of the following piece of code when executed in Python shell?

    a=("Check")*3
     a
  2. A.
    ('Check','Check','Check')
    B.
    * Operator not valid for tuples
    C.
    ('CheckCheckCheck')
    D.
    Syntax error

    View Answer

    Workspace

    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