How to Create a Module in Python


In this example we will show how to create a module in Python.

Source Code

# to create a module just save the code you want in a file with the file extension .py
def area(width, height):
    return width * height
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments