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

Cerca
Categorie
Leggi tutto
Mental Health
Autism Spectrum: Alternative medicine
A multitude of researched alternative therapies have also been implemented. Many have resulted in...
By Kelsey Rodriguez 2023-03-17 18:19:08 0 14K
Television
TV4 is Bullhead City’s Information Station. Live TV. Arizona, USA.
Everything TV4 broadcasts live on Suddenlink Cable channel 4, is also live streamed to the...
By Nikolai Pokryshkin 2022-11-23 10:32:07 0 33K
Business
What is a business accelerator?
What is a business accelerator?   A business...
By Leonard Pokrovski 2024-08-01 22:23:54 0 23K
Business
What is Management Science?
Management Science is a multidisciplinary approach to solving complex problems and improving...
By Dacey Rankins 2025-07-02 15:07:16 0 6K
Mental Health
Psychosis: Disorganization of speech/thought or behavior
Disorganization is split into disorganized speech (or thought), and grossly disorganized motor...
By Kelsey Rodriguez 2023-05-16 18:26:01 0 12K

BigMoney.VIP Powered by Hosting Pokrov