<s>[INST] How to read a file line by line into a list with Python How do I read every line of a file in Python and store each line as an element in list? 
I want to read the file line by line and each line is appended to the end of the list.
 [/INST] with open(fname) as f:
    content = f.readlines()

I'm guessing that you meant list and not array.
 </s>