how to read last value ,increment and append in the same file:Jython

后端 未结 0 577
萌比男神i
萌比男神i 2021-02-19 23:54

f = open(r"location.txt", "r+") //read value
f.seek(-1, os.SEEK_END) //last value value in the file
value = int(f.read())+1 // increment the value
r         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题