I have a txt file that looks like this:
FSDAF
HKLWF
AAKEP
How can I read that into a list so it looks like this:
lst = ['FSDAF', 'HKLWF', 'AAKEP']
I did something like this but I cant get rid of the newlines:
file = open('dane.txt', 'r')
lst = file.readlines()
And it displays the newlines like this:
['FSDAF\n', 'HKLWF\n', 'AAKEP\n']