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.
- A.
ab
- B.
rb
- C.
r+
- D.
a+
Attempted by 279 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.
Loading lesson…