bool |
| class bool(x=False) |
Returns the boolean True or False value (built-in). |
| ?? | ?? |
| REMARKS |
| * This function is used for type conversion or type casting values. * Return a Boolean value, i.e. one of True or False. x is converted using the standard truth testing procedure. If x is false or omitted, this returns False; otherwise, it returns True. * The bool class is a subclass of int (see Numeric Types - int, float, complex). It cannot be subclassed further. Its only instances are False and True (see Boolean Values). * x is a positional-only parameter. * You can use the float function to * You can use the int function to * You can use the str function to * For the Official documentation refer to python.org |
my_array = []
array_state = bool(my_array) #= False
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited Top