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

Search
Categories
Read More
Marketing and Advertising
Micro vs Macro vs Mega Influencers: What’s the Difference and When Should You Use Each?
Introduction: The Changing Face of Influence Influencer marketing has transformed from a fringe...
By Dacey Rankins 2025-10-08 18:17:07 0 4K
Game Studies
Game-Based Learning
The world of adults is incomprehensible to a small child. Adults do so much! There are police...
By Dacey Rankins 2024-04-04 17:26:15 0 15K
История
Тропы славы. Paths of Glory. (1957)
Действие киноромана развертывается в 1916 году на Западном фронте. Полковник Дэкс командует...
By Nikolai Pokryshkin 2022-12-16 12:56:36 0 27K
Business
How Much Does It Cost to Hire a Business Consultant?
Hiring a business consultant can be a smart investment for any company looking to improve its...
By Dacey Rankins 2025-02-10 18:16:58 0 14K
Services
20 ideas for business
Medical business is a type of entrepreneurial activity for the provision of services for the...
By FWhoop Xelqua 2022-12-26 14:13:13 0 31K

BigMoney.VIP Powered by Hosting Pokrov