Which of the following is the correct output of the given Python code? STR =…

PYQ KVS TGT/PGT 2026Modified — slightly modified from the official paper; see the solution

Which of the following is the correct output of the given Python code?

STR = "MIRROR OF FUTURE"
print(STR.partition("OF"))
  1. A.

    ('MIRROR ', 'OF', ' FUTURE')

  2. B.

    ['MIRROR', 'OF', 'FUTURE']

  3. C.

    ('MIRROR', 'FUTURE')

  4. D.

    ['MIRROR', 'FUTURE']

Attempted by 509 students.

Sign up free to check your answer

Sign up free

Explore the full course: Kvs Nvs Tier 2 Computer Science

Loading lesson…