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?
- A.
ab
- B.
rb
- C.
r+
- 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.