From the course: Intermediate Python for Non-Programmers

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Pickle and Python

Pickle and Python

- [Instructor] In this video, we're going to learn about pickling objects in Python. And no, you didn't mishear me. Pickling objects in Python, this is one of the greatest Python terms out there. What does it mean to pickle something? Well, it means to take some Python objects and turn them into data that you can save into a file and bring back later so that you can have access to it. It's doing what we're doing right now with our ToDo list, where we save everything inside of the text file but in a more efficient manner in that you can save more than just pieces of text. And you're going to see how all of this works here. Now, before we go ahead and jump in, I want to show you one piece from the Python documentation, and that is this little warning here. So basically, with this pickling stuff, right, again, we're taking Python objects, turning them into data, and then coming back again. It's telling us here, "Hey, if you ever load in pickle data which someone has manipulated to try…

Contents