isbool python code example
Example 1: python type checking boolean
isinstance(x[0], (int, float))
Example 2: python bool()
# Returns the boolean value of the specified object
x = bool(1) # outputs True
isinstance(x[0], (int, float))
# Returns the boolean value of the specified object
x = bool(1) # outputs True