Home / CSE MCQs / Python MCQs :: Discussion

Discussion :: Python MCQs

  1. What is the output of the following?

    d = {0: 'a', 1: 'b', 2: 'c'}
    for x in d.keys():
        print(d[x])
  2. A.
    0 1 2
    B.
    a b c
    C.
    0 a 1 b 2 c
    D.
    none of the mentioned

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Loops over the keys and prints the values.


Be The First To Comment