[Solved] How can I store an element permanetly, even if I restart the program again


As far as I know, there are actually a few options:

  1. An external .txt file
  2. The module Pickle
  3. A database

The module Pickle
– simple example of how to pickle work

import pickle
element= ["Summer","Sun"]
element.append("Ice")
pickling_on = open("Element.pickle","wb")
pickle.dump(element, pickling_on)
pickling_on.close()

So, now that the data has been pickled

pickle_off = open("Element.pickle","rb")
element = pickle.load(pickle_off)
print(element)

solved How can I store an element permanetly, even if I restart the program again