Boolean represents either true or False values. While evaluating an expression in Python we can get either a True Value or a False Value.

Also When we compare two values we get the the boolean (True or False) values returned.

print(2>3)
print("a"=="a")
print(89>=89)

The execution of If - else statements happens based on the boolean values. If the condition is true the execution takes place. Else the else part works.

a = 200

if a%2==0:
  print("Even Number")
else:
  print("Odd Number")

In the above code block the value in the variable a is an even number so hence when the if condition is true, the execution of if block happens.

Evaluate Values and Variables

print(bool(21))
print(bool("WiselyWise"))

So here the bool function will evaluate any variable and returns true or false. Since there are some values here. The bool returns True.