bool()

The bool() function converts an expression to a boolean.

Syntax

bool(expr)
Note:
  1. expr is the expression to convert.