If the function defined is in a file x.py
:
def greet():
print('Hello! How are you?')
In the file where you are importing the function, write this:
from x import greet
This is useful if you do not wish to import all the functions in a file.