Computer Science

What is the use of "w" in file handling?

Python File Handling

2 Likes

Answer

In file handling, the "w" mode is used to open a file for writing. If the file exists, it will be overwritten. If the file does not exist, a new file will be created with the specified name.

Answered By

1 Like


Related Questions