import datetime def timename(): timestamp=str(datetime.datetime.now()) timename=timestamp.replace(" ","--").replace(":","-").replace(".","-") return(timename)