Python Module

0
9K

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

Căutare
Categorii
Citeste mai mult
Financial Services
What is a free rider?
Key points A free rider is someone who wants others to pay for a public...
By Mark Lorenzo 2023-05-15 19:26:10 0 9K
Business
Who Influenced the CEO's Career?
Understanding Mentors and Role Models Provides Context to the CEO's Values and Motivations A...
By Dacey Rankins 2025-07-01 13:14:38 0 2K
Internet
Google ads: interface and settings
Definition Google Ads is an advertising platform for self-setting advertising campaigns with...
By FWhoop Xelqua 2023-01-30 17:35:11 0 17K
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,...
By Leonard Pokrovski 2024-05-17 00:10:48 0 14K
Comics
The Evolution of Comics: From Print to Digital and Beyond
Introduction Comics have long been a beloved medium for storytelling, offering a unique blend of...
By Dacey Rankins 2024-10-07 17:05:08 0 14K

BigMoney.VIP Powered by Hosting Pokrov