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
Television
WHO TV live stream. Des Moines, Iowa, USA.
WHO-HD Channel 13, is a NBC affiliate TV channel based in Des Moines, Iowa. The channel started...
By Nikolai Pokryshkin 2022-11-01 07:25:19 0 29K
Business
What Is Your Leadership Style?
Leadership is not a one-size-fits-all approach. Every leader brings a unique set of values,...
By Dacey Rankins 2025-05-07 14:10:43 0 7K
Социальные проблемы
Побег из Шоушенка. The Shawshank Redemption. (1994)
Бухгалтер Энди Дюфрейн обвинён в убийстве собственной жены и её любовника. Оказавшись в тюрьме...
By Nikolai Pokryshkin 2022-10-24 13:34:22 0 28K
Financial Services
International environmental issues
Key points Certain global environmental issues, such as global warming and...
By Mark Lorenzo 2023-05-05 20:07:53 0 12K
Business
Tools for analytics and sales management on marketplaces
In recent years, marketplaces have become an important part of sales strategies for many...
By Dacey Rankins 2024-09-13 19:20:46 0 13K

BigMoney.VIP Powered by Hosting Pokrov