Python對txt文件的操做

讀取指定的行的內容:python 一、讀取第三行內容code intputfile = r'E:\職業生涯\簡歷\簡歷\項目活動\大三上項目活動\小美賽\參考文獻\附件\enron_with_categories4.5\1\3111.txt' f = open(intputfile, 'r') for i in range(3): content = f.readline() #讀取第
相關文章
相關標籤/搜索