Python Module

0
7K

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

Search
Categories
Read More
Comics
Comics
To help beginners, we publish a list of terms that are used by experienced comic book readers....
By FWhoop Xelqua 2023-06-29 19:58:06 0 24K
Телевидение
6ТВ прямая трансляция, г. Горловка.
Телеканал «6ТВ» г. Горловка - первооткрыватель ТВ-пространства в Горловке. За годы...
By Nikolai Pokryshkin 2022-11-14 19:10:38 0 30K
Ужасы
Чужой. Alien. (1979)
В далеком будущем возвращающийся на Землю грузовой космический корабль перехватывает исходящий с...
By Nikolai Pokryshkin 2022-12-09 13:14:12 1 25K
Footbag
Footbag: The Artistry and Athleticism of Hacky Sack
Footbag: The Artistry and Athleticism of Hacky Sack In the realm of alternative sports that...
By Leonard Pokrovski 2024-06-25 16:54:44 0 14K
Programming
Python vs JavaScript Error Handling With 5 Levels
Level 1: Ignore Them, No Error Handling This level is when you write code without any error...
By Jesse Thomas 2023-05-23 20:18:12 0 7K
image/svg+xml


BigMoney.VIP Powered by Hosting Pokrov

Top sites Pokrov