Home / CSE MCQs / Python MCQs :: Discussion

Discussion :: Python MCQs

  1. What is the output of the following?

    print([i.lower() for i in "HELLO"])
  2. A.
    ['h', 'e', 'l', 'l', 'o'].
    B.
    'hello'
    C.
    ['hello'].
    D.
    hello

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    We are iterating over each letter in the string.


Be The First To Comment