文件基本處理

文件操作:讀取、寫入、定位,其他:追加、計算等     關閉文件:切斷文件與程序聯繫,寫入磁盤,釋放磁盤緩衝區 打開 <variable> = open (<name> , <mode>) infile = open(someFile, "r") for i in range(5) :     line = infile.readline()     print(line[:-1]) 文件遍歷:最
相關文章
相關標籤/搜索