I want to get a lot of usernames from file - each line is one username. Currently I use this code:
lista = []
z = open("usrnames.txt")
lista = z.readlines()
But then the results, which are saved in list are:
['username1\n', 'username2\n', 'username3\n']
I do not want to have EOLs... I except this result:
['username1', 'username2', 'username3']
How can I do that? I read documentation of this function, and didn't find any argument, which can disable putting EOLs...