Python Module

0
9K

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
История
Органы безопасности Российской империи конца XIX – начала XX вв
Отличительной особенностью развития отечественных органов безопасности на рубеже XIX–XX вв....
By Sergey Sokolov 2023-01-25 16:37:15 0 28K
Life Issues
Memento. (2000)
A man with short-term memory loss attempts to track down his wife's murderer. My Link
By Leonard Pokrovski 2022-12-13 21:06:02 0 22K
Health
Children's Health Trends: Insights Backed by Research and Statistics
In recent years, research and statistical analysis have provided invaluable insights into the...
By Dacey Rankins 2024-04-30 18:30:08 0 16K
Social Issues
The Trial of the Chicago 7. (2020)
The story of 7 people on trial stemming from various charges surrounding the uprising at the 1968...
By Leonard Pokrovski 2022-10-12 19:41:24 0 25K
Телевидение
RU.TV Онлайн ТВ
Главный русскоязычный музыкальный телеканал страны — ежедневно в режиме...
By Nikolai Pokryshkin 2022-10-11 11:59:42 0 31K

BigMoney.VIP Powered by Hosting Pokrov