Most pythonic way to convert to boolean?
python
Solution
If you really need a boolean, use `bool(something)`...
However, usually you don't need a boolean so rather than `return bool(something)`, you can just `return something` and the user can then decide what context to use it in.
Problem
What is the most pythonic way to convert to boolean based on the truthiness of the object? `return bool(an_object)` or ``` if an_object: return True else: return False ``` or something else entirely? In this instance we can't get by relying on the truthiness of the object.