Storing user data in a Python script

前端 未结 4 1763
伪装坚强ぢ
伪装坚强ぢ 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 13:57

    For 100 lines, plain text is fine with either the standard ConfigParser or csv modules.

    Assuming your data structure is simple, text affords opportunities (e.g. grep, vi, notepad) that more complex formats preclude.

提交回复
热议问题