0

Is it possible to read and write a file at the same time?

I'm writing a script that accepts user inputs and also supplies the latest data in the database, but my current code just overwrites the previous data.

Pang
  • 9,564
  • 146
  • 81
  • 122
  • Yes, it is possible. – zwer May 20 '17 at 00:10
  • Possible duplicate of [How do you append to a file?](http://stackoverflow.com/questions/4706499/how-do-you-append-to-a-file) – Darkstarone May 20 '17 at 00:25
  • If you are asking why your current code is behaving that way, you'd need to share the code by [editing](http://stackoverflow.com/posts/44080542/edit) it, otherwise we may only be able to recommend answers many of the other similar questions, such as [Python write to file without overwriting current txt](http://stackoverflow.com/questions/22441803/python-write-to-file-without-overwriting-current-txt) – chickity china chinese chicken May 20 '17 at 00:40

0 Answers0