當前位置:成語大全網 - 書法字典 - 如何將python的讀取文件轉換成數組?

如何將python的讀取文件轉換成數組?

妳好:

請查看以下代碼:

txt path = r“a . txt“

FP = open(txt path)

arrA=【】

為了什麽?linea?在?fp.readlines():

arrA.append(復雜(linea . replace(“\ n“,““)))

fp.close()

打印?保證金