filename = '...'with open(filename) as f: items = list(f)
or
with open(filename) as f: items = f.readlines()
NOTE: \n
is included for each line for both the solutions above.
or
Process each line and append to list
items = []with open(filename) as f: for line in f: items.append(line.rstrip()) # items.append(float(line))