Python Module

0
12KB

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
Marketing and Advertising
How Do I Measure Digital Marketing Success? (KPIs Explained)
Introduction: Why Measuring Success Matters Digital marketing is not just about creating...
Por Dacey Rankins 2025-10-02 19:56:38 0 10KB
Жизненные вопросы
Унесенные призраками. Spirited Away. (2001)
Тихиро с мамой и папой переезжает в новый дом. Заблудившись по дороге, они оказываются в странном...
Por Nikolai Pokryshkin 2022-11-24 20:18:50 0 27KB
Ужасы
Время. Old. (2021)
Отправившись в отпуск на тропический остров, семья с двумя детьми решает последовать совету...
Por Nikolai Pokryshkin 2022-09-11 22:13:06 0 42KB
Marketing and Advertising
How Does Radio Advertising Work?
Radio advertising has remained a powerful marketing channel for decades because of its ability to...
Por Dacey Rankins 2026-02-06 19:17:05 0 518
Health
6 ideas to give to improve health
New Year is a holiday that is most often celebrated in the circle of the closest people. We have...
Por FWhoop Xelqua 2022-12-27 13:03:18 0 24KB

BigMoney.VIP Powered by Hosting Pokrov