Select the output for the given Python code from the following options…

PYQ KVS TGT/PGT 2023

Select the output for the given Python code from the following options D1={1:2,2:3,3:4} D2=D1.get(1,2) print(D2)

  1. A.

    2

  2. B.

    3

  3. C.

    [2, 3]

  4. D.

    {1:2,2:3}

Attempted by 1930 students.

Sign up free to check your answer

Sign up free

Explore the full course: Kvs Nvs Tier 2 Computer Science

Loading lesson…