Built-in Functions
bool()
Convert a value to True or False.
bool(value=False)
bool() tests whether a value counts as true. Empty collections, zero, and an empty string are false; many other values are true.
Parameters
| Name | Description |
|---|---|
| value | The value to test. If omitted, it defaults to false. |
Returns
True or False.
Try it
Run it and change it
items = [] print(bool(items))