New course! Every coder should learn Generative AI!
Try a free lesson+ 6
It evaluates its argument (a variable or an expression) and returns its boolean (logic) value - whether the expression is True or False.
>>> bool(2+2==4)
True
>>> bool(1==0)
False