Python: How to Save and Load Data for Beginners

preview_player
Показать описание
In this video, you will learn how to use the pickle module, which lets you easily save and load data to and from a file.

▶▶NEED HELP?◀◀

▶▶▶▶ LINKS ◀◀◀◀

▶▶▶▶ LEARN MORE PYTHON ◀◀◀◀
**AND**

▶▶▶▶ LEARN MORE JAVA ◀◀◀◀
Рекомендации по теме
Комментарии
Автор

This is fantastic, I finally understand what pickle actually is. Halfway through the video I did, and I've literally tried reading about how to use it MULTIPLE times before with it just actually making no sense for some reason. This is rather simple though.

industrialdonut
Автор

On windows system("cls") works

valizeth
Автор

You are the best! Such a clear and concise explanation! You have definitely earned a subscriber!

andrewolacey
Автор

AC/DC and Python in one video...




Who could ask for more?

Alexrules
Автор

Rafy-Ivan Morales
0 seconds ago
I'm a new student trying to learn, so I can become a programmer with python and I have a project on how to make a port scan.

So far I already make a port scan with Python3, and it scans fine, give a date and everything working good so far.

I see on your video tutorial you give example on how to send and receiving data.

I would like to ask for your advice if you can and guide me on how I will add this 3
in a Python script, I have:

2. System should look for all the ports between the range of 1 to 1025
3. If the Ports is open, it should create a file and add an entry for port number
4. In case of any exception for instance “host is not available”, “host name could not be resolved” or
due to any other error, you need to write that exception into the same file.


Thank you and Merry Christmas.

rafy-ivanmorales
Автор

Thanks, simple but very useful tutorial :)

FezanRafique
Автор

Thanks???! I created some python games(Bitcoin mining simulator(4000 lines of code) walkthrough on my channel)that are 100% pure python made but they are without saving system and now i founded a solution!!! THANKS FOR THAT TUTORIAL!!!!

gamertronky
Автор

Great channel. Could this save then load back a whole instance of a class?

OktaFierce
Автор

I really enjoy your coding style. I might take some inpiration from it.

own
Автор

omg thank you i searched the whole day for a solution xD

animationsbelike
Автор

Can u please put up a video on pickle by creating a class node and inserting new nodes like binary search tree and save it. Again open the file and add new nodes with some values. And display the output with just a function to search new value as well as old values. The job is to not repeat the insertion of old items again. But the algorithm must only insert new items display the result using the time consumed. Can you please take it as a challenge. Plz help me to solve this. 🙂👍🏻

rohitkumarj
Автор

Hi, very informative video, is there a way to create a list of numbers from a bunch of different inputs, probably as floats for what i need, and then be able to save the inputs and change them if i need to?

FilipeHyphen
Автор

Excellent video! But what if I just want to save the list values to a file, but not the data structure (the list itself)? I've tried to do it, but couldn't figure out how it can be done.

pcfin
Автор

I am trying to do a “high score” type function in a game I made, my problem is that I cannot compare the length of a list (my score) to a variable(?) (high score)... my end goal would be to save the score with pickle, compare the score with the highscore which starts at 0 and replace the highscore with the len(list) each time it is necessary... I’ve been struggling for a few days now... I could post the code if you need to see it.
Great video btw !

rafaelboisel
Автор

soo but im trying to write a "note" program that saves what you write and you can edit the varible.

austino
Автор

So is there a way to code it to where I could go out of the code, come back in and say I code a load screen and one of the options in load game, then can I load the file back in?

brixlionstudio
Автор

Can you use the pickle module to save a high score for a game? If you can, how do you do it?

raiyan.aztecscoc
Автор

Thank You for this video! Helped me out a lot!

devsquares
Автор

So is the idea that each variable saved in this way would need its own file? Because you do not specify which variable to load from the file, so presumably it's loading the whole file as once to be saved in some variable upon loading, correct? So you would need a different file for each variable you are saving.

I followed a tutorial once to create a roguelike game in Python and it made use of the Shelve module, which was quite similar, except that it uses a dictionary so that you can save different variables under a given name. If anyone watching would like to save multiple variables in a single file, that is probably something to look into, once you have understood the basics given in this video.

Phagocytosis
Автор

I don't know why you would use this though, say you have ATOM open and your writing code and need to save a list how is it any diff from coping the list and saving to a diff .py file than import that file when needed? its kind of the same thing, no?

sodapopinski
welcome to shbcf.ru