How to Write Modules in Python3?

Python modules are also another python files .py files that consist of Python code. Most of the modules are available at the Python Standard Library and they are installed during the python standard installation. Other packages can be installed via pip. We can also create custom modules which are as per our requirements. Even they are comprised of additional python .py files.