Python Module

0
8K

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

Site içinde arama yapın
Kategoriler
Read More
Financial Services
Elasticity in areas other than price
Key points Elasticity is a general term, referring to percentage change of one...
By Mark Lorenzo 2023-04-14 17:08:27 0 10K
Television
ABC Live TV Action Weather 24/7. Tampa Bay, Florida, USA.
ABC Action Weather 24/7. Live Stream. ABC Action News brings you weather coverage from the Tampa...
By Nikolai Pokryshkin 2022-10-30 19:56:11 0 36K
Crafts
The World of Art Crafts: Creativity, Culture, and Craftsmanship
Art crafts, often referred to as "handicrafts," represent a broad and diverse range of creative...
By Dacey Rankins 2024-12-13 14:32:49 0 4K
Социальные проблемы
Леон Профессионал. Léon: The Professional. (1994)
Профессиональный убийца Леон неожиданно для себя самого решает помочь 12-летней соседке Матильде,...
By Nikolai Pokryshkin 2022-11-26 22:44:17 0 25K
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 21K
image/svg+xml


BigMoney.VIP Powered by Hosting Pokrov