what is the bool function? pls explain | Sololearn: Learn to code for FREE!

+1

what is the bool function? pls explain

10/24/2018 6:02:06 PM

Saranraj C

1 Answer

New Answer

+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