懵懂的菜鸟

Stay hungry,Stay foolish.

导航

按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)

 

posted on 2017-08-17 15:05  懵懂的菜鸟  阅读(171)  评论(0编辑  收藏  举报