How to read two packed lists from binary file in Python

1 Answer

0 votes
import pickle

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


'''
run:

['python', 'c', 'c++', 'c#', 'java']
['php', 'html', 'css', 'javascript']

'''

 



answered Dec 22, 2017 by avibootz

Related questions

1 answer 189 views
1 answer 238 views
1 answer 174 views
1 answer 241 views
1 answer 200 views
200 views asked Nov 16, 2018 by avibootz
1 answer 175 views
...