1f = open("filename", "r") #Load file in any mode that's able to read, ie r, r+, w+ etc
2
3#to get length
4len(f.readlines())
5
6#To iterate over each line
7for line in f.readlines(): #file.readlines(), splits the file into a list, where each element is a seperate line
8 print(line)