Python Module

0
10كيلو بايت

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

البحث
الأقسام
إقرأ المزيد
Business
B2B Marketing
B2B Marketing   In B2B (business to business), one company sells a product or...
بواسطة Leonard Pokrovski 2024-08-30 20:22:18 0 29كيلو بايت
Farms
Which animals can be bred at home for income
Which animals can be bred at home for income Hello world! What animals can be bred at home...
بواسطة Leonard Pokrovski 2024-04-25 12:08:53 0 15كيلو بايت
Agriculture and Forestry
Agriculture and Forestry: Pillars of Sustainability and Global Prosperity
Agriculture and forestry are two of the oldest and most essential human activities, serving as...
بواسطة Dacey Rankins 2024-11-11 17:01:58 0 10كيلو بايت
Business
How Startups Can Validate Their Business Ideas
For startups, one of the most crucial steps before launching a product or service is validating...
بواسطة Dacey Rankins 2025-03-21 14:09:25 0 11كيلو بايت
Developers and Publishers
Video Game Publisher
A computer game publisher is a company that publishes computer games developed internally or by...
بواسطة Dacey Rankins 2024-04-02 17:21:22 0 14كيلو بايت

BigMoney.VIP Powered by Hosting Pokrov