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).

Căutare
Categorii
Citeste mai mult
Nudism
Germany is the birthplace of nudism.
Germany, indeed, is powerfully connected with the culture of the naked body. Between 8 and 12...
By Dacey Rankins 2024-07-29 14:09:33 0 21K
Television
FOX 6 Live TV. Milwaukee USA.
Milwaukee news, weather, traffic and sports from FOX6, serving southeast Wisconsin. Get breaking...
By Nikolai Pokryshkin 2022-09-20 08:52:35 0 42K
Alte
Betting On Zero. (2016)
Writer/director Ted Braun follows controversial hedge fund titan Bill Ackman as he puts a billion...
By Leonard Pokrovski 2023-06-11 14:32:29 0 34K
Business
What Skills Does a Successful Sales Manager Need?
A sales manager’s success is not defined by how well they can sell —it’s...
By Dacey Rankins 2025-12-23 19:54:33 0 4K
Marketing and Advertising
Why is Content Marketing Important?
In the modern digital economy, content marketing has become a core business strategy rather than...
By Dacey Rankins 2025-09-29 20:20:35 0 5K

BigMoney.VIP Powered by Hosting Pokrov