What is pickle in python?
Pickle is a standard Python library that handles serialization – that is, a way to take variables that are otherwise stored in memory, and output them in a format that can be stored to a file and read from later.
In easy words we can say that pickle is a module which helps to modulate the file selected in a python friendly way so that python can easily work on it.
We can easily import it and use it.
As we do in file handling we can do it in this also. We can read data, write data and modify it. It has some special functions like pickle.loads(), pickle.dumps(), etc.
We can pickle object of following data types.
- Integer and floats
- Complex numbers
- Dictionaries(which has picklable object)
This is all about pickle library in python.
Please login to comment
View all comments