Importing Custom Module and Calling Function :

# File: mymodule.py
# def greeting(name):
#   print("Hello, " + name)

import mymodule
mymodule.greeting("Jonathan")

Output :

Hello, Jonathan

Accessing Dictionary from Module :

# File: mymodule.py
# person1 = {
#   "name": "John",
#   "age": 36,
#   "country": "Norway"
# }

import mymodule
a = mymodule["person1"]["age"]
print(a)

Output :

36

Importing Module with Alias :

import mymodule as mx
print(mx["person1"]["age"])

Output :

36

Using Built-in Module platform and dir() :

import platform

x = platform.system()
print(x)

y = dir(platform)
print(y)

Output :

Windows
['__builtins__', '__cached__', '__doc__', ..., 'version']