I am trying to open a file in python. It is in a folder named R and the file I want to open is called PROTO.rtf
This is the code I have so far:
filepath = os.path.join(R, "PROTO.rtf")
file = open(filepath)
content = f.read()
This is the error it throws when I try to create my filepath:
NameError: name 'R' is not defined
Ris a variable here, not a string. You have noRvariableRa variable? If not, then make it a string'R'