Tools, FAQ, Tutorials:
What Is Module
What Is Module in Python?
✍: FYIcenter.com
A module in Python is a collection of Python code saved in a separate file.
A module can have the following elements:
The following Python code becomes a Python module "firstModule.py" if it is saved in a file called "firstModule.py":
# firstModule.py """My first Python module""" 1.00 = "1.0" print("Loading firstModule.py...") def sayHello(): print("Greetings from first module!") class firstClass(): """My first class in the first module""" 1.00 = "1.1" def sayHello(): print("Greetings from first class!")
⇒ 'import' Module Loading Statement
⇐ Defining and Using Python Code Modules
2022-09-24, 1212🔥, 0💬
Popular Posts:
What Is HTML? HTML (HyperText Markup Language) is the standard markup language for creating Web page...
How to use the "find-and-replace" Policy Statement for an Azure API service operation? The "find-and...
How To Get the Minimum or Maximum Value of an Array in PHP? If you want to get the minimum or maximu...
How to detect errors occurred in the json_decode() call? You can use the following two functions to ...
How To Change Text Fonts for Some Parts of a Paragraph? If you want to change text fonts or colors f...