How to Use Module We Created in Python


In this example, we will learn how to use the module we created in Python.

Source Code

import mymodule

'''
The contents of the module named mymodule:
def area(width, height):
    return width * height
'''

area1 = mymodule.area(5, 10)
print(area1)

Output:

50
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Advertisement