Python callable() Function
ExampleGet your own Python Server
Check if a function is callable:
def x():
a = 5
print(callable(x))
Try it Yourself »
Definition and Usage
The callable()
function returns True if the
specified object is callable, otherwise it returns False.
Syntax
callable(object)
Parameter Values
Parameter | Description |
---|---|
object | The object you want to test if it is callable or not. |