The if statement conditionally executes a statement's suite. One form is shown here:
Python has to determine whether if's expression is true or false. If the expression is true, Python executes the suite; if not, it doesn't. As we discussed in Chapter 3, Python doesn't have a Boolean (true/false) type. Instead, it uses any numeric value other than zero to indicate true and uses zero, any empty sequence, and the value None to indicate false. For example, the following will print "hello" because the expression contains a value of 1.
>>> # 1 is true >>> if(1): ... print("hello") ... hello
Notice that the subordinate statement, print, is indented, which shows that it's part of the suite associated with ...