MkyTaP - 開發筆記
主要工具: Linux, Python, SQL
Friday, January 11, 2019
Python: pickle example
import pickle
links = []
if os.path.isfile('links.pkl'):
all_content_links = pickle.load(open('links.pkl', 'r'))
else:
links = fetch_links()
pickle.dump(links , open('links.pkl', 'w'))
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment