Python callable() Function
Description
Syntax
Python
Copy Code
callable(object)
Parameters
Parameter | Description |
---|---|
object |
Required. The object to test for callability. |
Example
Python
Copy Code
isCallable = callable("abc") print(f'"abc" is callable: {isCallable}') def abc(): Pass isCallable = callable(abc) print(f'function abc is callable: {isCallable}')
Output
"abc" is callable: False function abc is callable: True