The callable()
function checks if an object is callable, i.e. if it is a function, a method, a lambda function, or a class. It takes a single argument and returns a boolean value (True
or False
).
Syntax:
callable(obj)
copy
obj |
The object to check whether it can be called all not. |
Parameters:
The function returns a boolean value. True
if the object is callable, False
otherwise.