Q. What is the difference between "w" and "a" modes?

 

Answer =

 

"w" mode :- If file exists, python will delete all data of the file.

"a" mode :- If file exists, the data in the file is retained and new data being written will be appended to end.

 

8 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post