KnowledgeBoat Logo

Computer Science

When you open a file for writing, if the file exists, the existing file is overwritten with the new file.

Python File Handling

2 Likes

Answer

True

Reason — When we open a file for writing using w mode (text files) or wb mode (binary files), if the file exists, Python will truncate the existing data and overwrite in the file.

Answered By

1 Like


Related Questions