Python callable() function

Anfani

Check if the function is callable:

def x():
  a = 7
print(callable(x))

Anfani Misani

Definition and Usage

If the specified object is callable, the callable() function returns True, otherwise it returns False.

Syntax

callable(object)

Parameter Value

Parameter Description
object Need to test if the object is callable.

More Anfani

Anfani

Anfani dabbabu yantata dabbabu dabbabu yantata

x = 7
print(callable(x))

Anfani Misani