Site icon i2tutorials

Callable() method in Python Built in Function

Callable() method in Python Built in Function

callable method in built in function returns the value as TRUE if the desired value is callable or else the output is FALSE.

 

Syntax:

callable(object)

 

Parameter of callable

 

Example -1:

 

When the object is callable

y = testFunction
print(callable(y))

 

Output:

 

Example-2:

 

When the value is non-callable

a = 5
print(callable(a))

 

Output:

Exit mobile version