Built-in Functions
callable()
Check whether an object can be called with parentheses.
callable(object)
callable() helps you tell whether a value behaves like a function. Classes and many objects with a __call__ method are also callable.
Parameters
| Name | Description |
|---|---|
| object | The value to test. |
Returns
True if the object appears callable; otherwise False.
Try it
Run it and change it
def greet():
return "Hello"
print(callable(greet))