human
Converting a string into a list in Python
assistant
Here is some code to append each line in file `myfile` into a list

[x for x in myfile.splitlines() if x != '']

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