You can use the import keyword to call your function. I have attached one example below. You can go through it.
Say you have one python file like this.
$ notepad basic.py
Now you can call this function into a different python file like this.
from basic import fun
I hope this will give you some ideas.