# Try: age = 15, has_id = True → denied (age fails) # Try: age = 20, has_id = False → denied (id fails) # Try: age = 20, has_id = True → welcome!
The bool () function converts values to True or False based on truthiness rules: 0, 0.0, empty strings, empty lists, empty dicts, and None are falsy; most other values are truthy. A common trap is ...