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.
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.