I wanna write a word game program in python but I don't know how to import a text file into my program. Suppose I create a txt file called 'words', then I write:
file = open('words.txt', 'r')
print file.readline()
But I get the error message 'IOError: [Errno 2] No such file or directory: 'hello.txt' '
I saved both files in the same folder. What have I done wrong?