Python Module

0
9كيلو بايت

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

البحث
الأقسام
إقرأ المزيد
Television
TheDove TV Stream. United States.
theDove Mission StatementOur Mission is simple; theDove exists to proclaim the Good News of Jesus...
بواسطة Nikolai Pokryshkin 2022-11-17 12:57:06 0 28كيلو بايت
Business
What Are the Characteristics of a Good Mentor?
Mentoring is a powerful relationship that can shape careers, build confidence, and inspire...
بواسطة Dacey Rankins 2025-05-22 20:12:29 0 5كيلو بايت
Financial Services
What factors change demand?
Key points Demand curves can shift. Changes in factors like average income and...
بواسطة Mark Lorenzo 2023-06-27 18:14:33 0 10كيلو بايت
Science Fiction and Fantasy
Batman Begins. (2005)
After training with his mentor, Batman begins his fight to free crime-ridden Gotham City from...
بواسطة Leonard Pokrovski 2023-02-03 16:09:37 0 20كيلو بايت
История
Взвод. Platoon. (1986)
В сентябре 1967 года куда-то в приграничный район между Вьетнамом и Камбоджей прибыл рядовой...
بواسطة Nikolai Pokryshkin 2023-04-16 17:55:42 0 27كيلو بايت

BigMoney.VIP Powered by Hosting Pokrov