If you want to read line-by-line in python then
with open('/path/to/file', 'r') as f:
for line in f:
print(line)
If you want to read the entire file to a list of lines
with open('/path/to/file', 'r') as f:
data = f.readlines()
Or if you want to use pathlib
from pathlib import Path
p = Path('/path/to/file')
with p.open('r') as f:
for line in p:
print(line)
# or
with p.open('r') as f:
data = f.readlines()
And then there's PySpark, Pandas, etc...