python读取文件另存为
1 fr = open(filename_r,encoding='cp852') 2 w2 = open(filename_w,'a')#a代表追加 w代表重写 3 4 for line in fr: 5 w2.write(line) 6 fr.close() 7 w2.close( )
Stay hungry,Stay foolish.
1 fr = open(filename_r,encoding='cp852') 2 w2 = open(filename_w,'a')#a代表追加 w代表重写 3 4 for line in fr: 5 w2.write(line) 6 fr.close() 7 w2.close( )