Python Module

0
12χλμ.

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

Αναζήτηση
Κατηγορίες
Διαβάζω περισσότερα
Programming
Difference between C++ and JavaScript
C++ or CPP is a general-purpose statically typed object-oriented programming language. In 1980,...
από Jesse Thomas 2023-06-06 20:53:20 0 11χλμ.
Business
What is a business model?
A business model is a crucial component of any company, whether it's a startup or an established...
από Dacey Rankins 2025-01-09 15:23:12 0 12χλμ.
Ιστορίες
The Treasure of the Sierra Madre. (1948)
Two down-on-their-luck Americans searching for work in 1920s Mexico convince an old prospector to...
από Leonard Pokrovski 2023-02-20 17:13:40 0 21χλμ.
Financial Services
Changes in equilibrium price and quantity: the four-step process
Key points There is a four-step process that allows us to predict how an event...
από Mark Lorenzo 2023-04-10 20:19:42 0 21χλμ.
Business
How Has the Role of Influencers Evolved Over Time?
Influencers have become an integral part of modern marketing strategies and digital culture, but...
από Dacey Rankins 2025-02-28 16:06:29 0 13χλμ.

BigMoney.VIP Powered by Hosting Pokrov