I have a number of functions func_1, func_2, ... , func_n, each has its own number of parameters, but all of them return either a numeric value or None.
I want to write a universal printing function that will have as the first parameter the name of one of func_1, func_2, ... , func_n. It should print the return value if it is not None.
Ideally, it should look something like this:
def universal_print(func, maybe_something_else_I_don't_know):
if func is not None:
print(func())
I don't understand how to pass parameters of the function to be printed to universal_print given that each function has its own number and type of parameters.
Is my problem solvable in general? If yes, how?