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
Toys and Games
Tips for Choosing Toys
Toys are needed for the child not only for entertainment, but also for proper development. Now...
By FWhoop Xelqua 2022-09-08 17:51:26 0 29K
Marketing and Advertising
What Is a Podcast?
Introduction In an era dominated by on-demand content, the podcast has emerged as one of the...
By Dacey Rankins 2025-10-21 15:28:26 0 3K
Finance
How Certain Financiers Built Their Wealth and the Investment Philosophies Behind Their Success
How Certain Financiers Built Their Wealth and the Investment Philosophies Behind Their Success...
By Leonard Pokrovski 2025-10-08 19:40:19 0 5K
Business
What Questions Do Investors Ask After a Pitch?
Great pitches impress investors — but great answers win investments. In venture capital,...
By Dacey Rankins 2025-12-03 15:49:42 0 2K
Business
Who Should Be Invited to the Meeting?
Why Selecting the Right Participants Drives Better Results Meetings are an essential part of...
By Dacey Rankins 2025-05-30 14:54:21 0 8K

BigMoney.VIP Powered by Hosting Pokrov