with open("positive-words.txt") as text_file:
file = text_file.read()
for line in file:
if not file.startswith(';') and not file.startswith(' '):
self.positives.add(file.rstrip("\n"))
file.close()
And the error I get:
if not .startswith(';') and not file.startswith(' '):
^