Don't use pickle,use Json is't just better and you get human readable file on disk.
Data serialization is the concept of converting structured data into a format that allows it to be shared,
or stored in such a way that its original structure to be recovered.
Instead of storing stuff in singe variables think of a data structure like eg dictionary.
Data serialization is the concept of converting structured data into a format that allows it to be shared,
or stored in such a way that its original structure to be recovered.
Instead of storing stuff in singe variables think of a data structure like eg dictionary.
>>> record = dict(name='jonathan', Damage=10) >>> record {'Damage': 10, 'name': 'jonathan'}
import json record = dict(name='jonathan', Damage=10) with open("my_file.json", "w") as j: json.dump(record, j) with open("my_file.json") as j_out: saved_date = json.load(j_out) print(saved_date) #--> {'Damage': 10, 'name': 'jonathan'}