Python Module

0
6K

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
Internet
Google ads - Youtube ads
Part 5: Google Shopping / Google ads (bigmoney.vip) YouTube advertising in numbers YouTube is...
By FWhoop Xelqua 2023-02-09 16:05:55 0 14K
Graphics
Neural networks for the designer: the best services with AI to simplify the work
Neural networks are a powerful tool that can help designers improve the efficiency and quality of...
By FWhoop Xelqua 2023-06-15 20:11:05 0 25K
Business
Search engine promotion: how it works
Introduction to search engine promotionSearch engine promotion (SEO) is the process of optimizing...
By Dacey Rankins 2024-09-18 17:32:30 0 12K
Business
Who is a Marketing Director, and what do they do?
Who is a CMO and what does he do? A marketing director is a senior manager who is...
By Dacey Rankins 2024-09-02 19:39:58 0 8K
Science Fiction and Fantasy
WALL·E (2008)
In the distant future, a small waste-collecting robot inadvertently embarks on a space journey...
By Leonard Pokrovski 2022-12-15 20:28:27 0 14K
image/svg+xml


BigMoney.VIP Powered by Hosting Pokrov