Pythonic wayThe most Pythonic way to open a file and iterate through each line is like this:with open('file.txt') as f: for line in f: # do ...
確定! 回上一頁