In Python language, which of following mode for opening the file, opens the…

2024

In Python language, which of following mode for opening the file, opens the file for both reading and writing and file pointer will be placed at the start of the file?

Answer: C. r+In Python, `r+` opens a file for both reading and writing with the file pointer at the start.

  1. A.

    ab

  2. B.

    rb

  3. C.

    r+

  4. D.

    a+

Attempted by 280 students.

Show answer & explanation

Correct answer: C

In Python, `r+` opens a file for both reading and writing with the file pointer at the start.

Explore the full course: Hpsc Pgt Computer Science

Loading lesson…