Q. What role is played by file modes in file operations? Describe the various file mode constants and their meanings.
Answer =
File mode refers to how the file will be used once it's opened.
There are three types of file modes:-
(1) read mode :- It will read data of file according to program.
(2) write mode :- Python delete all data and write new data according to user.
(3) append mode :- The data in the file is retained and new data being written will be appended to end.
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )