excerpt from my python script located at C:\Users\my_name\documents\python_projects\randomness\random.py :
some_number = 3452342
filename = str(some_number) + '.csv'
# file 3452342.csv is stored in C:\Users\my_name\documents\python_projects\randomness\history
# call a function that takes the filename as the parameter
my_func(r'history\filename')
It triggers the following error:
FileNotFoundError: [Errno 2] File b'history\filename' does not exist: b'history\filename'
what exactly is going wrong here? How can I pass the filename to my_func when it is located in a sub-folder?
thanks in advance