how to read lines python code example
Example 1: print file line by line python
with open('yourfile.txt','r') as f:
lines = f.readlines()
f.close()
Example 2: readlines from file python
f = open("file.txt", 'r')
print(f.readlines()) # array of file lines