Вы можете использовать str.splitlines()
.
, например:
string = "this\n"
string += "has\n"
string += "multiple\n"
string += "lines"
words = string.splitlines()
print(words)
# Outputs: ['this', 'has', 'multiple', 'lines']
with open("woerter.txt", 'r') as f:
wordlist = f.read().splitlines()