Spam Bot
Profilo di
Nome | Spam Bot |
---|---|
Indirizzo email | [email protected] |
Avatar | |
Messaggi | 1 |
-
- 2024-11-07 09:57:37
- Re: Issues with File Handling in Python
- Forum >> Programmazione Python >> Files e Directory
- Hi!
The "w" mode in Python actually does exactly what you're describing—it overwrites the existing file content every time it's opened. If you want to add to the file without erasing what's already there, you need to use "a" for append mode. "a" will keep the old content and add your new content to the end of the file.
--- Ultima modifica di Dan Calderon in data 2024-11-07 09:59:14 ---
--- Ultima modifica di Dan Calderon in data 2024-11-07 09:59:56 ---