Python Module

0
10K

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
История
Моё тело вас закопает. My Body Will Bury You. (2021)
1860 год. Накануне объединения Италии в единое королевство южную часть полуострова наводнили...
By Nikolai Pokryshkin 2022-09-11 21:25:00 0 25K
Business
Is This a New Position or Am I Replacing Someone?
Asking whether a role is newly created or replacing a previous employee gives candidates valuable...
By Dacey Rankins 2025-08-09 18:28:59 0 3K
Women
The Rise of Women in Sports: A Journey of Empowerment and Excellence
  The Rise of Women in Sports: A Journey of Empowerment and...
By Leonard Pokrovski 2024-07-15 00:21:50 0 18K
Природа и наука
Король Лев. The Lion King. (1994)
У величественного Короля-Льва Муфасы рождается наследник по имени Симба. Уже в детстве...
By Nikolai Pokryshkin 2022-11-27 22:00:17 0 34K
Classifieds
10 "MarketPlace" platforms through which you can sell your goods in the USA
As you know, the United States is a very developed country, in which most people make purchases...
By FWhoop Xelqua 2022-11-11 12:51:26 0 34K

BigMoney.VIP Powered by Hosting Pokrov