I have a project in which I need to do some things, call one of a few functions, and then do some other things:
def doCommand(function, parameter_for_function):
# do a thing
function(parameter_for_function)
# do a thing
My problem is that I don't know if the function I will be passing will require a parameter of its own!
How can I allow my function to call both functions that have no parameters, and functions that have one?