What will be the output of the following Python code? L=[1,1,2,1,5,4,1,3,1];…

PYQ KVS TGT/PGT 2026

What will be the output of the following Python code? L=[1,1,2,1,5,4,1,3,1]; print(L.index(L.count(1)))

  1. A.

    5

  2. B.

    4

  3. C.

    ValueError

  4. D.

    IndexError

Attempted by 275 students.

Sign up free to check your answer

Sign up free

Explore the full course: Kvs Nvs Tier 2 Computer Science

Loading lesson…