A module is a .py file in Python in which variables, functions, and classes can be defined. It can also have a runnable code.