按str 存储和按 list 存储
按str 存储
1 w2 = open('./trsd_w.txt','a')#a代表追加 w代表重写 2 if matcher1: 3 flag = 1 4 w2.write("\n") 5 for j in matcher1: 6 for k in j: 7 w2.write(k)
按 list 存储
1 w2 = open('./trsd_w.txt','a')#a代表追加 w代表重写 2 if matcher1: 3 flag = 1 4 w2.write("\n") 5 for j in matcher1: 7 w2.write(j)