【python】經常使用文件讀取

前言 本篇文章介紹經過python讀寫各類文件,涉及TXT,Excel,CSV,JSON文件。python TXT文件讀取 文件內容以下: 代碼以下: import numpy as np # Method 1 file1 = open("TXT.txt") while True: line = file1.readline() print(line) if not line: bre
相關文章
相關標籤/搜索