Skip to content

Boole

Boole(expr)

returns 1 if expr evaluates to True; returns 0 if expr evaluates to False; and gives no result otherwise.

Examples

>> Boole(2 == 2)
1
>> Boole(7 < 5)
0
>> Boole(a == 7)
Boole(a==7)

Implementation status

  • ✅ - full supported

Github