a = open('new.txt','r',encoding="utf-8")
b = open("new1.txt","w",encoding="utf-8")
c = a.read()
print(c.encode('utf-8').decode("unicode_escape"),file=b)
a.close()
b.close()
原本是将a的文字转换后输出到b
有办法将a转换后输出回a吗
作者: roccqqck (ccqq) 2019-11-10 18:26:00
print( ‘hello’, file=open(‘output.txt’, ‘a’) )