原始:
加入”180618“
结果:
with open('n.txt', 'r+',encoding='utf-8') as f:
content = f.read()
f.seek(0, 0)
f.write('180618\n'+content)
原始:
加入”180618“
结果:
with open('n.txt', 'r+',encoding='utf-8') as f:
content = f.read()
f.seek(0, 0)
f.write('180618\n'+content)