To make code conditionally in Python you use an if – elif construction. Pay attention to the elif instead of else if! To hold all the code together you need to indent it using a tab. So nu curly brackets or begin, end like other languages indentation is required in Python.

# Operators:
# And: and
# Or: or
# Equals: a == b
# Not Equals: a != b
# Less than: a < b
# Less than or equal to: a >= b
# Greater than: a > b
# Greater than or equal to: a >= b
# Is NULL: Is None

varUnitPrice = 1.55
varQuantity = 5
varLineTotal = varQuantity * varUnitPrice                  # 602.75

# Indentation is required! 
if varLineTotal &lt; 100  or  varQuantity == 1 : 
    varOrderLineSize = "Small"
elif varLineTotal >= 100 and varLineTotal &lt; 500 :  
    varOrderLineSize = "Medium" 
elif varLineTotal >= 500 and varLineTotal &lt; 1000 : 
    varOrderLineSize = "Large" 
else:
    varOrderLineSize = "Extra Large" 

print(varOrderLineSize)                                            # "Large"