摘要:
import os dir_txt = "data/demo/" txt_path_List = [] cnt_2 = 0 g = os.walk(dir_txt) for path, d, filelist in g: for filename in filelist: if filename.e 阅读全文
摘要:
#python 读取文本: ##方法1: with open(txt_path, "r") as fr: lines = fr.readlines() for line in lines: line = line.strip() #去除换行符 \n ##方法2: f = open("tmp2.txt 阅读全文