Python callable() Function
Python callable() Function
The callable() function returns a boolean value ‘True’ if the specified object is callable, else it returns False.
Syntax
callable(object)
Parameter
Object: The object parameter represents the value to test if it is callable or not.
Return
This function returns a returns Boolean value true, if the given object is callable.
Example 1
# Python program explaining
# callable() function
def call():
return 5
# an object is created of call()
val = call
print('callable() function will return: ',callable(val))
num = 15 * 15
print('callable() function will return: ',callable(num))
Return
callable() function will return: True callable() function will return: False
