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

Search
Categories
Read More
Mental Health
Prevention
Prevention of schizophrenia is difficult as there are no reliable markers for the later...
By Kelsey Rodriguez 2023-02-06 17:54:11 0 12K
Maps
Armenia on the Babylonian Map
What do we know about the oldest maps of the world that have survived to this day. There are only...
By FWhoop Xelqua 2022-12-14 13:50:09 0 22K
Жизненные вопросы
Отец. The Father. (2020)
Энтони уже далеко не молод и живет один в лондонской квартире. Он считает, что прекрасно...
By Nikolai Pokryshkin 2023-02-05 12:53:46 0 32K
Life Issues
Room. (2015)
A little boy is held captive in a room with his mother since his birth, so he has never known the...
By Leonard Pokrovski 2023-04-12 20:32:38 0 32K
Television
Our Journey with God. Live TV.
Our Journey with God. Jesus Live network. Channel 3. My Link
By Nikolai Pokryshkin 2022-10-06 08:55:48 0 30K

BigMoney.VIP Powered by Hosting Pokrov