Python Module

0
11كيلو بايت

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

البحث
الأقسام
إقرأ المزيد
Financial Services
Investing in human capital
Key points Almost universally, economists agree that it is a good individual...
بواسطة Mark Lorenzo 2023-05-10 18:45:31 0 13كيلو بايت
Business
The benefits of the video blogger business: how to turn a hobby into income
What is the business of video bloggers and how to start a career Video blogging has long grown...
بواسطة Dacey Rankins 2024-09-11 12:04:19 0 12كيلو بايت
Financial Services
Law of Demand
Key points The law of demand states that a higher price leads to a lower...
بواسطة Mark Lorenzo 2023-01-25 14:05:14 0 16كيلو بايت
Социальные проблемы
Таксист. Taxi Driver. (1976)
Тусклый свет слепых фонарей, скелеты фабричных труб, задыхающихся в собственном дыму. Вавилонские...
بواسطة Nikolai Pokryshkin 2023-01-27 18:42:14 0 26كيلو بايت
Institutions
Science Institutions: Pillars of Innovation and Discovery
Science institutions are the backbone of knowledge creation, innovation, and research. These...
بواسطة Dacey Rankins 2024-12-11 15:17:46 0 9كيلو بايت

BigMoney.VIP Powered by Hosting Pokrov