由于python在EOF上返回空字符串,而不是“ EOF”本身,因此您只需检查代码即可,写在这里 f1 = open("sample.txt") while True: line = f1.readline() ...
確定! 回上一頁