python之pickle

#!/usr/bin/python
# -*- coding: UTF-8 -*-

'''

'''
import pickle

# pickle 只能Python識別 不適用於別的語言
li = [11, 22, 33, 433, 'sd']
r = pickle.dumps(li)
print(r)
print "*******"
result = pickle.loads(r)
print(result)


運行結果:
(lp0
I11
aI22
aI33
aI433
aS'sd'
p1
a.
*******
[11, 22, 33, 433, 'sd']
相關文章
相關標籤/搜索