How to read a list from binary file in Python

1 Answer

0 votes
import pickle

fh = open("d:\data.pkl", "rb")
lang = pickle.load(fh)
print(lang)
fh.close()


'''
run:

['python', 'c', 'c++', 'php']

'''

 



answered Dec 21, 2017 by avibootz

Related questions

1 answer 254 views
1 answer 202 views
1 answer 263 views
1 answer 206 views
206 views asked Nov 16, 2018 by avibootz
1 answer 175 views
...