Python Module

0
12K

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

Cerca
Categorie
Leggi tutto
Life Issues
Going Clear: Scientology & the Prison of Belief (2015)
A documentary looking at the inner-workings of the Church of Scientology. my link
By Leonard Pokrovski 2023-07-22 17:18:01 0 30K
Business
How Can Late-Stage Startups Maintain Innovation?
As startups transition into late-stage companies, maintaining innovation becomes a challenge....
By Dacey Rankins 2025-03-07 13:42:46 0 13K
Arts, Culture and Entertainment
Jodorowsky's Dune (2013)
The story of cult film director Alejandro Jodorowsky's ambitious but ultimately doomed film...
By Leonard Pokrovski 2023-07-23 18:44:27 0 30K
Business
What Is a Pitch?
Introduction: Why “Pitching” Matters Everywhere Whether you're trying to attract...
By Dacey Rankins 2025-12-02 20:07:43 0 2K
Comics
The Fascinating World of Comics: More Than Just Superheroes
Comics have long been a staple of popular culture, captivating readers of all ages and...
By Dacey Rankins 2025-01-20 16:16:11 0 12K

BigMoney.VIP Powered by Hosting Pokrov