You can define your first file to have all the functions, for example :
file_1.py
import numpy as np def func_a(a,b): res = a + b print("func_a, result : ", res) return res def func_b(a,b): res = np.sum(np.array((a,b))) print("func_b, result : ", res) return res
To import them from another file, you'd use exec(open("file_1.py").read()) (see this answer) and you'd have the contents of the second file to be :
file_2.py
exec(open("file_1.py").read()) a = 1 b = 1 arr = [func_a,func_b] for i in arr: i(a,b)
And then you can run file_2.py in a shell by :
(ipy3) sajid@DESKTOP-NDBN82B:/mnt/c/Users/sajid/Documents/misc/temp$ python file_2.py func_a, result : 2 func_b, result : 2 (ipy3) sajid@DESKTOP-NDBN82B:/mnt/c/Users/sajid/Documents/misc/temp$