What will be the output of the following Python code? P = ["A", "B"] Q = (0,…

PYQ KVS TGT/PGT 2026

What will be the output of the following Python code?

P = ["A", "B"]
Q = (0, 1)
R = dict.fromkeys(P, Q)
print(R)
  1. A.

    {'A': (0, 1), 'B': (0, 1)}

  2. B.

    {'A': 0, 'B': 1}

  3. C.

    {'A': 1, 'B': 0}

  4. D.

    ['A': (0, 1), 'B': (0, 1)]

Attempted by 521 students.

Sign up free to check your answer

Sign up free

Explore the full course: Kvs Nvs Tier 2 Computer Science

Loading lesson…