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

Site içinde arama yapın
Kategoriler
Read More
Business
What’s the Product Management Career Path and Qualifications?
Product management has emerged as one of the most dynamic and in-demand career paths in the...
By Dacey Rankins 2025-08-18 13:26:02 0 7K
Business
How Do I Write a Business Plan?
Writing a business plan is a crucial step for anyone starting or growing a business. It serves as...
By Dacey Rankins 2025-04-30 12:48:39 0 16K
Business
How Can I Tell If a User Story Is Too Large?
In Agile development, user stories are designed to be small, actionable units of work that...
By Dacey Rankins 2025-08-25 18:37:49 0 17K
Business
What Certifications Help With IaaS?
The cloud industry has a curious relationship with credentials. Ask ten hiring managers whether...
By Dacey Rankins 2026-06-08 16:50:05 0 1K
История
1917. (2019)
6 апреля 1917 года, разгар Первой мировой войны, Западный фронт на севере Франции. Британский...
By Nikolai Pokryshkin 2023-02-01 22:53:04 0 54K

BigMoney.VIP Powered by Hosting Pokrov