Python從txt文件中逐行讀取數據

很是的簡單,提供三種方法:python 方法一:ide [python]  view plain  copy   f = open("foo.txt")             # 返回一個文件對象   line = f.readline()             # 調用文件的 readline()方法   while line:       print line,              
相關文章
相關標籤/搜索