Python: if, elif, else

if <statement is true>:
    <do something>
    ....
    ....
elif <another statement is true>: # else if
    <do something else>
    ....
    ....
else:
    <do another thing>
    ....
    .... 

For example:

x = 2
if x == 2:
    print "x equals two!"
else:
    print "x does not equal to two."

A statement is evaulated as true if one of the following is correct: 1. The “True” boolean variable is given, or calculated using an expression, such as an arithmetic comparison. 2. An object which is not considered “empty” is passed.

Here are some examples for objects which are considered as empty: 1. An empty string: “” 2. An empty list: [] 3. The number zero: 0 4. The false boolean variable: False