Computer Science
When you open a file for writing, if the file does not exist, an error occurs.
Python File Handling
2 Likes
Answer
False
Reason — When a file is opened for writing using w mode (text files) or wb mode (binary files), if the file does not exist, file is created.
Answered By
1 Like
Related Questions
Fill in the blanks:
To specify a different delimiter while writing into a csv file, _________ argument is used with csv.writer().
When you open a file for reading, if the file does not exist, an error occurs.
When you open a file for writing, if the file exists, the existing file is overwritten with the new file.
The absolute paths are from the topmost level of the directory structure.