python append current time to filename code example
Example: python add datetime to filename
from datetime import datetime
date = datetime.now().strftime("%Y_%m_%d-%I:%M:%S_%p")
print(f"filename_{date}")
'filename_2020_08_12-03:29:22_AM'
from datetime import datetime
date = datetime.now().strftime("%Y_%m_%d-%I:%M:%S_%p")
print(f"filename_{date}")
'filename_2020_08_12-03:29:22_AM'