Discuss file opening modes in detail
Answers
Answered by
1
Answer:
Opening a file - for creation and edit
Mode Meaning of Mode
r+ Open for both reading and writing.
rb+ Open for both reading and writing in binary mode.
w+ Open for both reading and writing.
wb+ Open for both reading and writing in binary mode.
Answered by
2
Explanation:
Below are some of the most commonly used modes for opening or creating a file.
- r : opens a text file in reading mode.
- w : opens or creates a text file in writing mode.
- a : opens a text file in append mode.
- r+ : opens a text file in both reading and writing mode. ...
- w+ : opens a text file in both reading and writing mode.
Similar questions