# It returns True if the object is callable and False otherwise print callable(dir) # built-in function print callable(1) # integer def foo(): pass print callable(foo) # user-defined function print callable('bar') # string class C(object): pass print callable(C) # class