More than 1 year has passed since last update.
f = open('filename')

line = f.readline()

while line:
    line = f.readline()

f.close()

Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.