I'm using format to test a function in Python. I would like the output of a function
def test(f,k):
print "{0}({1})={2}".format(f,k,f(k))
given
test(Sqrt,4)
to be
Sqrt(4)=2
But format is giving back the type 'function' and a memory address inside angle braces. Is there a neat way to shorten the output to get what I'm after?