Home / CSE MCQs / Python MCQs :: Discussion

Discussion :: Python MCQs

  1. What will be the output?

    names1 = ['Amir', 'Bala', 'Charlie']
    names2 = [name.lower() for name in names1]
     
    print(names2[2][0])
  2. A.
    None
    B.
    a
    C.
    b
    D.
    c

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    List Comprehension are a shorthand for creating new lists.


Be The First To Comment