文件读写操作 # f=open('test.txt','w')# f.write('王why1234')# f.close()f=open('test.txt','r+')f.seek(5)f.truncate()f.close()