import pickle as pk
data_dictionary = {'books': 12, 'articles': 100, 'subjects': ['math', 'programming', 'data science']}
with open('readings.pk', 'wb') as f:
pk.dump(data_dictionary, f)
with open('readings.pk', 'rb') as f:
data = pk.load(f)
print(data)
No comments:
Post a Comment