I'm trying to do this with open(fileName,'rb') as csvfile:. It works if I hardcode a name for fileName, but if I use fileName = input("Enter file name: ") I get an error
...
fileName = input("Enter file name: ")
File "<string>", line 1, in <module>
NameError: name 'page1' is not defined
where page1.csv is the intended file and what I enter for when asked for input. How can I fix this?