Python Module

0
9KB

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

Suche
Kategorien
Mehr lesen
Business
Why Should We Hire You?
  An Opportunity for Candidates to Highlight Their Unique Qualifications and Fit for the...
Von Dacey Rankins 2025-06-18 14:58:03 0 4KB
Business
How Often Should I Update My Business Plan?
A business plan is a dynamic document that provides a roadmap for your company’s growth and...
Von Dacey Rankins 2024-12-19 15:06:58 0 12KB
Geschichte
For a Few Dollars More. (1965)
Two bounty hunters with the same intentions team up to track down an escaped Mexican outlaw....
Von Leonard Pokrovski 2023-02-02 14:34:20 0 22KB
Business
How Do You Handle Underperforming Employees?
Managing underperformance is one of the more delicate challenges a manager can face. An...
Von Dacey Rankins 2025-05-12 16:45:14 0 4KB
Whips
The Art of Recreation: Exploring the Craft of Whip Making
The Art of Recreation: Exploring the Craft of Whip Making Whips have a storied history,...
Von Leonard Pokrovski 2024-05-17 00:10:48 0 14KB

BigMoney.VIP Powered by Hosting Pokrov