Python可以使用pickle做序列化:
序列化示例:
import picklewith open('les.pickle', 'wb') as f: pickle.dump(les, f, -1)
反序列化
import picklewith open('les.pickle', 'rb') as le: les = pickle.load(le)