See, for example, this post. The checked answer provides several examples leveraging the behavior we are discussing in code.
Here is a discussion with some historical context.
Speaking of history, PEP 285 is instructive: From the mouth (well, keyboard) of Guido himself:
Should we strive to require that Boolean operations (like “if”, “and”, “not”) have a bool as an argument in the future, so that for example “if [ ]:” would become illegal and would have to be written as “if bool([ ]):” ???
Some people believe that this is how a language with a textbook Boolean type should behave. Because it was brought up, others have worried that I might agree with this position. Let me make my position on this quite clear. This is not part of the PEP’s motivation and I don’t intend to make this change.
This PEP does not change the fact that almost all object types can be used as truth values. For example, when used in an if statement, an empty list is false and a non-empty one is true; this does not change and there is no plan to ever change this.