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