Beginner) If I save Python, can I run it with the contents I saved the next time I use it?

Asked 2 years ago, Updated 2 years ago, 15 views

As the title says, it's a question. If you get a certain value from Python, run the program, and then run Python next time, the entered value disappears, and it starts with initialization at the next execution, right? But I want to know how to save the input value and use it when running the next program!

python

2022-09-20 19:37

1 Answers

You'll have to save it as a file and read it again.

The simplest way to store Python variables in Python is to use the pickle.


2022-09-20 19:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.