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?

  1. A.

    ab

  2. B.

    rb

  3. C.

    r+

  4. D.

    a+

Attempted by 45 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: Rssb Senior Computer Instructor