how to check that the element is boolean python code example Example: python type checking boolean isinstance(x[0], (int, float))