Python Module

0
13K

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

Pesquisar
Categorias
Leia Mais
Internet
How to make your Telegram channel popular in 2023
Telegram is one of the three most popular messengers. There is an adult and active audience here,...
Por FWhoop Xelqua 2023-06-04 19:52:03 0 26K
Marketing and Advertising
What Are User Acquisition Strategies?
User acquisition strategies are structured methods businesses use to attract new users to their...
Por Dacey Rankins 2026-02-26 15:00:04 0 10K
Economics
What is the future of globalization?
What Is the Future of Globalization? Globalization has transformed the world by connecting...
Por Leonard Pokrovski 2026-08-25 00:15:50 0 2K
Business
How to Manage Files Automatically?
Managing files efficiently is essential in any office environment. With the growing volume of...
Por Dacey Rankins 2026-04-24 20:58:51 0 3K
Business
What Does a Product Manager Do?
A product manager (PM) wears many hats, acting as a strategist, communicator, and decision-maker...
Por Dacey Rankins 2025-08-15 20:31:55 0 8K

BigMoney.VIP Powered by Hosting Pokrov