import pickle
lst = ["c++", "php", "java", "python"]
# write
with open("d:\\lst.bin", "wb") as file:
pickle.dump(lst, file)
# read
with open("d:\\lst.bin", "rb") as file:
data = pickle.load(file)
print(data)
'''
run:
['c++', 'php', 'java', 'python']
'''