Home / CSE MCQs / Python MCQs :: Discussion

Discussion :: Python MCQs

  1. Is the following piece of code valid?

    a=2,3,4,5
     a
  2. A.
    Yes, 2 is printed
    B.
    Yes, [2,3,4,5] is printed
    C.
    No, too many values to unpack
    D.
    Yes, (2,3,4,5) is printed

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    A tuple needn't be enclosed in parenthesis.


Be The First To Comment