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

Cerca
Categorie
Leggi tutto
Marketing and Advertising
What Is Display Advertising? Examples and Formats Explained
Display advertising is one of the most widely used and visually recognizable forms of online...
By Dacey Rankins 2026-01-29 19:07:10 0 2K
Marketing and Advertising
What Is Negative Keyword Targeting?
Negative keyword targeting is one of the most important — and most overlooked —...
By Dacey Rankins 2026-02-19 17:14:48 0 1K
Money
What College Students Need from a Bank
  What College Students Need from a Bank Before picking a specific bank or bank account,...
By Leonard Pokrovski 2025-09-23 19:56:02 0 8K
Marketing and Advertising
How Do I Measure Outdoor Advertising Effectiveness?
Measuring outdoor advertising effectiveness has historically been one of the biggest challenges...
By Dacey Rankins 2026-02-02 18:11:29 0 2K
Business
What is a Business Plan?
A business plan is a comprehensive document that outlines the vision, mission, goals, and...
By Dacey Rankins 2024-12-17 14:46:53 0 11K

BigMoney.VIP Powered by Hosting Pokrov