Im attempting to open a file in a program but I got hit with this error: "[Errno 2] No such file or directory"
I saw that getting the absolute path instead of the relative path is a potential fix, but I'm not sure how to go about doing that. If anyone has a way that I can get the absolute path of my file or has another way this can be fixed please let me know. Thank you in advance!
filename = "customer_records.txt"
with open(filename) as f:
lines = f.read().splitlines()
a = []
for line in lines:
a.append(line.split(","))