Storing user data in a Python script

前端 未结 4 1786
伪装坚强ぢ
伪装坚强ぢ 2020-12-15 13:33

What is the preferred/ usual way of storing data that is entered by the user when running a Python script, if I need the data again the next time the script runs?

Fo

4条回答
  •  庸人自扰
    2020-12-15 14:19

    Since you only need the last result, just store the result in a file.

    Example

    write('something', wb)
    

    It will only store the last result. Then when you re-run the script, do a open and read the previous result.

提交回复
热议问题