Python bool() Function
Definition and Usage
The bool()
function returns the boolean
value of a specified object.
The object will always return True, unless:
The object is empty, like [], (), {}
The object is False
The object is
0
The object is None
Syntax
bool(object)
Parameter Values
Parameter | Description |
---|---|
object | Any object, like String, List, Number etc. |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.