fredrik at pythonware.com
Tue Oct 25 09:53:53 CEST 2005
Shi Mu wrote:
> what does the following code mean?
> y = pickle.load(file("cnumber.pickle", "r"))
open the file "cnumber.pickle" for reading, pass the file handle to
the pickle.load function, and store the result in the "y" variable.
> also, I can not understand "f" in pickle.dump(x, f)
the second argument to pickle is a file handle, opened for writing.
pickle.dump will save the "pickled data" to that file.
More information about the Python-list