Here is the canonical code to open a file, read all the lines out of it, handling one line at a time. with open(filename) as f: for line in f: # look at line in ...
確定! 回上一頁