I want to pass a function to a function in Python. I know I can do this simply by putting the function name as a parameter, eg:
blah(5, function)
However, I want to pass the int()
function and the float()
function to this function. If I just put the function name in then it assumes I am referring to the int
and float
types not the functions for converting strings to ints and floats.
Is there a way to pass the function rather than the type?