Python Module

0
12K

If you quit from the Python interpreter and enter it again, the definitions you have made (functions and variables) are lost. Therefore, if you want to write a somewhat longer program, you are better off using a text editor to prepare the input for the interpreter and running it with that file as input instead. This is known as creating a script. As your program gets longer, you may want to split it into several files for easier maintenance. You may also want to use a handy function that you’ve written in several programs without copying its definition into each program.

To support this, Python has a way to put definitions in a file and use them in a script or in an interactive instance of the interpreter. Such a file is called a module; definitions from a module can be imported into other modules or into the main module (the collection of variables that you have access to in a script executed at the top level and in calculator mode).

Cerca
Categorie
Leggi tutto
Economics
What Is the Difference Between Commerce and Business?
What Is the Difference Between Commerce and Business? People often use the words commerce and...
By Leonard Pokrovski 2026-02-13 19:12:01 0 743
Productivity
How do I stay motivated to be productive?
How Do I Stay Motivated to Be Productive? Motivation is not a constant state—it fluctuates...
By Michael Pokrovski 2026-02-23 21:03:53 0 293
Elenco
Monty Python and the Holy Grail. (1975)
King Arthur and his Knights of the Round Table embark on a surreal, low-budget search for the...
By Leonard Pokrovski 2023-02-21 14:48:48 0 23K
Arts, Culture and Entertainment
Sunset Blvd. (1950)
A screenwriter develops a dangerous relationship with a faded film star determined to make a...
By Leonard Pokrovski 2022-12-16 15:53:32 0 26K
Television
His Channel. Live TV. Santa Ana, California, USA
His Channel or The Conservative Christian Network is based in Santa Ana, California. Programming...
By Nikolai Pokryshkin 2022-09-27 08:20:04 0 40K

BigMoney.VIP Powered by Hosting Pokrov