f = open("file.txt") line = f.readline() while line: print(line) line = f.readline() f.close(). 說明:除了上面的用法,也可以使用for line in ...
確定! 回上一頁