Python Module

0
10K

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
Robotics
Robotics
Robotics is an applied science that deals with the development of automated technical...
By Michael Pokrovski 2024-03-29 23:20:05 0 28K
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...
By Dacey Rankins 2024-11-11 17:01:58 0 10K
Business
What Do You Like Most About Working for This Company?
During a job interview, one insightful question candidates often ask is: "What do you like most...
By Dacey Rankins 2025-06-24 15:32:48 0 4K
Business
How do I handle issues related to content strikes or demonetization?
As a content creator, dealing with content strikes or demonetization can be a frustrating and...
By Dacey Rankins 2025-02-21 15:15:17 0 9K
Телевидение
Прямой эфир РБК.
Качественные и актуальные бизнес-новости, аналитика и экспертные оценки в режиме...
By Nikolai Pokryshkin 2022-10-06 09:42:51 0 28K

BigMoney.VIP Powered by Hosting Pokrov