Python Module

0
13K

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

Site içinde arama yapın
Kategoriler
Read More
Productivity
Can minimalism reduce consumerism?
Can Minimalism Reduce Consumerism? Minimalism and consumerism are often positioned as opposing...
By Michael Pokrovski 2026-04-12 17:49:07 0 28K
Television
RT, live TV. Russia.
RT’s flagship, award-winning English-language channel airs 24/7 from the network’s...
By Nikolai Pokryshkin 2022-11-14 17:11:18 0 39K
Decision Making and Problem Solving
How do students develop creative thinking?
How Do Students Develop Creative Thinking? Creativity Often Begins Where Certainty Ends A...
By Michael Pokrovski 2026-06-11 19:53:05 0 8K
Business
First Item on the Agenda: Is This Meeting a Waste of Time?
We’ve all been there: sitting in a conference room or on a video call, wondering why...
By Dacey Rankins 2025-06-03 13:26:48 0 29K
Human Resources
What Are Current Trends in Personnel Management?
Personnel management is undergoing a significant transformation as organizations respond to...
By Dacey Rankins 2026-04-14 03:13:58 0 2K

BigMoney.VIP Powered by Hosting Pokrov