Comment garder une trace de vos temps de course de sport à Python

import datetime

class BoldColors() :

    # Bold
    Black='\033[1;30m'       # Black
    Red='\033[1;31m' 
    

dt = datetime.datetime.today()
day = dt.day
month = dt.month
year = dt.year

yourTime = input(BoldColors.Red+"Please enter your best time : ")
yourWorstTime = input(BoldColors.Black+"Please enter your worst time : ")
with open('Times.txt', 'a') as f:
    f.writelines(f"{day}/{month}/{year}: best time {yourTime} worst time {yourWorstTime} ")
    f.writelines('\n\n')
vagg