Python Module

0
13كيلو بايت

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

البحث
الأقسام
إقرأ المزيد
مال
What is a Balance Transfer Credit Card?
  What is a Balance Transfer Credit Card? A balance transfer credit card is a financial...
بواسطة Leonard Pokrovski 2025-09-17 20:46:59 0 8كيلو بايت
Economics
What Is Fiscal Policy?
What Is Fiscal Policy? Fiscal policy is one of the primary tools governments use to influence a...
بواسطة Leonard Pokrovski 2026-04-02 20:11:46 0 8كيلو بايت
Спорт
Семь самураев. Seven Samurai. (1954)
Япония, XVI век. В стране полыхает гражданская война, повсюду орудуют банды разбойников и...
بواسطة Nikolai Pokryshkin 2022-11-15 17:46:10 0 40كيلو بايت
Business
Amazon and Etsy Selling: Two Marketplaces, Two Completely Different Businesses
At first glance, Amazon and Etsy appear to solve the same problem. Both connect buyers and...
بواسطة Dacey Rankins 2026-06-20 15:07:34 0 4كيلو بايت
Спорт
Убить Билла 1-2. Kill Bill: Vol. 1 - 2. (2003-2004)
Убить Билла 1. Kill Bill: Vol. 1. (2003)В беременную наемную убийцу по кличке Черная Мамба во...
بواسطة Nikolai Pokryshkin 2023-02-23 18:52:53 0 30كيلو بايت

BigMoney.VIP Powered by Hosting Pokrov