As doc says:
For reading lines from a file, you can loop over the file object. This is memory efficient, fast, and leads to simple code
There is an example also about looping over file object.
Assuming your input is like
45 66 786 44
3 17 5 400
57 88 9 80 4
This code will put every number to a list. Then you can access them from those lists as you wish.
with open("numbers.txt") as f:
for line in f:
print (line.strip().split()) #strip removes newlines and split, does splitting.
#if you give split an argument it will split
#respect to that instead of spaces
>>>
['45', '66', '786', '44']
['3', '17', '5', '400']
['57', '88', '9', '80', '4']