s1=open(‘简单‘,mode=‘a‘,encoding=‘utf-8‘)
coun2=s1.write(‘wwwwwww‘)
print(coun2)
s1.close()
with open(‘简单‘,encoding=‘utf-8‘,mode=‘a+‘)as f1:
print(f1.write(‘222‘))
f1.seek(0)
print(f1.read())
原文:https://www.cnblogs.com/xiaoxiannvdbky/p/14844762.html