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
Programming
Display Data from Python to HTML
When making a web application, you're probably thinking if displaying data from Python to HTML is...
By Jesse Thomas 2023-01-26 19:18:03 0 14K
Marketing and Advertising
Can I Use AdSense With Other Ad Networks?
One of the most common questions publishers ask after getting approved for Google AdSense...
By Dacey Rankins 2025-12-26 18:20:25 0 3K
Programming
JavaScript Electron.js
Electron.js is a runtime framework that allows the user to create desktop-suite applications...
By Jesse Thomas 2023-06-01 21:02:46 0 11K
Business
What Is Benchmarking?
In today’s competitive business environment, understanding how your organization performs...
By Dacey Rankins 2025-08-27 15:07:46 0 4K
Business
How is Growth Hacking Implemented in Organizations?
Growth hacking has grown from a niche startup practice into a mainstream methodology for...
By Dacey Rankins 2025-09-12 16:23:36 0 6K

BigMoney.VIP Powered by Hosting Pokrov