How to get python Script output in Text file ,without overwriting current one text file

Hello I have written python code which run by task scheduler. This code delete the folder which are older than 5 days. code is working fine but I took output of this code in log text file. whenever code run existing log file overwritten. I want see every schedule log , that’s not possible now.
How I can get output of code in different file every time or in same file without overwriting data.