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

Cerca
Categorie
Leggi tutto
Mental Health
Autism Spectrum: Brain Connectivity
Brains of autistic individuals have been observed to have abnormal connectivity and the degree of...
By Kelsey Rodriguez 2023-02-27 16:28:01 0 10K
Science Fiction and Fantasy
How to Train Your Dragon. (2010)
A hapless young Viking who aspires to hunt dragons becomes the unlikely friend of a young dragon...
By Leonard Pokrovski 2023-04-08 20:29:05 0 31K
Mental Health
ADHD: Social construct theory
The social construct theory of ADHD suggests that, because the boundaries between normal and...
By Kelsey Rodriguez 2023-04-21 14:14:43 0 8K
Parallel Computing
Scientists have found a way to double the speed of computer calculations without replacing hardware
At the 56th Annual IEEE/ACM International Symposium on Microarchitecture, researchers from the...
By Michael Pokrovski 2024-03-22 20:43:29 0 21K
Television
His Channel. Live TV. Santa Ana, California, USA
His Channel or The Conservative Christian Network is based in Santa Ana, California. Programming...
By Nikolai Pokryshkin 2022-09-27 08:20:04 0 33K

BigMoney.VIP Powered by Hosting Pokrov