Computer Science
When you open a file for writing, if the file does not exist, a new file is created.
Python File Handling
1 Like
Answer
True
Reason — When we open a file for writing using w mode (text files) or wb mode (binary files), if the file does not exist, a new file is created.
Answered By
2 Likes
Related Questions
Functions readline() and readlines() are essentially the same.
Python automatically flushes the file buffers before closing a file with close() function.
When you open a file for appending, if the file exists, the existing file is overwritten with the new file.
Conversion of an object hierarchy in byte stream is called Serialisation.