human
read a file line by line into a list
assistant
Here is some code to read file 'filename' line by line into a list `lines`

lines = [line.rstrip('\n') for line in open('filename')]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.