In this example we will show how to import only parts from a module in Python.
Source Code
from mymodule import area
'''
The contents of the module named mymodule:
def area(width, height):
return width * height
student1 = {
'name': 'Jim',
'age': 15,
'id': 16
}
'''
area1 = area(5, 10)
print(area1)
Output:
50