Home / CSE MCQs / Python MCQs :: Discussion

Discussion :: Python MCQs

  1. What is the output of the following?

    x = 'abcd'
    for i in x:
        print(i.upper())
  2. A.
    a b c d
    B.
    A B C D
    C.
    a B C D
    D.
    error

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    The instance of the string returned by upper() is being printed.


Be The First To Comment