Python callable() Function

Description

Syntax

Python
callable(object)

Parameters

ParameterDescription
object Required. The object to test for callability.

Example

Python
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