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
Alte
Baraka (1992)
A collection of expertly photographed scenes of human life and religion. My Link
By Leonard Pokrovski 2023-07-05 20:24:56 0 35K
Business
How is User Behavior Tracked?
In the digital age, businesses thrive when they understand how users interact with their...
By Dacey Rankins 2025-08-22 18:42:56 0 6K
Marketing and Advertising
How Will We Measure the Success of a Product Launch?
A Comprehensive Guide to Launch Metrics, KPIs, and Continuous Improvement A product launch...
By Dacey Rankins 2025-10-29 16:13:21 0 7K
Business
Situation, Task, Action, Result: Mastering the STAR Interview Method
When it comes to job interviews, few tools are as effective—or as widely...
By Dacey Rankins 2025-06-23 14:34:49 0 9K
Television
RT, live TV. Russia.
RT’s flagship, award-winning English-language channel airs 24/7 from the network’s...
By Nikolai Pokryshkin 2022-11-14 17:11:18 0 33K

BigMoney.VIP Powered by Hosting Pokrov