import pickle
a = {'hello': 'world'}
with open('filename.pickle', 'wb') as handle:
pickle.dump(a, handle, protocol=pickle.HIGHEST_PROTOCOL)
with open('filename.pickle', 'rb') as handle:
b = pickle.load(handle)
print a == b
import pickle #credits to stack overflow user= blender
a = {'hello': 'world'}
with open('filename.pkl', 'wb') as handle:
pickle.dump(a, handle, protocol=pickle.HIGHEST_PROTOCOL)
with open('filename.pkl', 'rb') as handle:
b = pickle.load(handle)
print (a == b)
with open('mypickle.pickle', 'wb') as f:
pickle.dump(some_obj, f)
# note that this will overwrite any existing file# in the current working directory called 'mypickle.pickle'
Python 3.4.1 (default, May 212014, 12:39:51)
[GCC4.2.1 Compatible Apple LLVM5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits"or"license"for more information.>>>import pickle
>>> with open('parrot.pkl', 'rb') as f:
... mynewlist = pickle.load(f)
...>>> mynewlist
['I wish to complain about this parrot what I purchased not half an hour ago from this very boutique.', "Oh yes, the, uh, the Norwegian Blue...What's,uh...What's wrong with it?", "I'll tell you what's wrong with it, my lad. 'E's dead, that's what's wrong with it!", "No, no, 'e's uh,...he's resting."]
>>>
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems
resetting your password contact us
Check Your Email and Click on the link sent to your email