So I have an assignment for college in python and for a part of it, I need to open the file "voting.txt". I coded up the assignment in Pycharm, as that's the IDE we use in college, but my preferred IDE is VSCode. In Pycharm the code works fine. I run the code and I get the results I want. However, when I try to run the code in VSCode, I get a FileNotFoundError. The file I want to open is in the same directory as the code that opens it. I don't know whether there's a setting that tells VSCode to look for the file in a specific directory, or what, but I'm hoping someone will have a solution. Below is the python code to open the file, so as you can see, the syntax is correct, and as i said, the text file and the python file containing the code that opens it is in the same directory:
fileOut = open("voting.txt", "r")