Python Module

0
5K

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

Search
Categories
Read More
СМИ
В центре внимания. Spotlight. (2015)
Основанная на реальных событиях история журналистского расследования одного из самых громких в...
By Nikolai Pokryshkin 2023-04-18 11:31:42 0 16K
Sport
Kill Bill: Vol. 1. (2003)
After awakening from a four-year coma, a former assassin wreaks vengeance on the team of...
By Leonard Pokrovski 2023-02-24 17:06:46 0 11K
Social Issues
Thirteen. (2003)
A thirteen-year-old girl's relationship with her mother is put to the test as she discovers...
By Leonard Pokrovski 2023-04-28 19:32:50 0 16K
Financial Services
Decisions within a budget constraint
Key points The budget constraint is the boundary of the opportunity...
By Mark Lorenzo 2023-07-12 20:28:58 0 5K
Radio
Rediscovering Recreation: The Art of Entertainment Through Radio
Rediscovering Recreation: The Art of Entertainment Through Radio In an era of dazzling visual...
By Leonard Pokrovski 2024-05-14 22:18:37 0 8K
image/svg+xml


BigMoney.VIP Powered by Hosting Pokrov