If the dictionary D1 is defined as: D1 = {1: ‘a’, 2: ‘b’} then which of the…

PYQ Bihar STET 2025Modified — slightly modified from the official paper; see the solution

If the dictionary D1 is defined as: D1 = {1: ‘a’, 2: ‘b’} then which of the following statements is incorrect and hence will result in an error?

  1. A.

    D1.get(1)

  2. B.

    D1.get(3)

  3. C.

    D1.del(1)

  4. D.

    D1.clear()

Attempted by 1329 students.

Sign up free to check your answer

Sign up free

Explore the full course: Bihar Stet Computer Science Complete Course

Loading lesson…