The code that I am currently using is this:
date = time.strftime("%d/%m/%y")
filename = ('attendence{}' + str(date) +'.txt')
f = open(filename, 'w+')
However, the error I receive is this:
FileNotFoundError: [Errno 2] No such file or directory: 'attendence{}31/03/17.txt'
The error is not with other parts of my code as this will work.
f = open('attendence{}.txt', 'w+')
my end goal is to create a new file that contains the current date.
with open(filename, 'w+') as f: ...date = time.strftime("%d%m%y")instead.