If statements if r != None: val = eval(r.group(1)) * 8 / 1000.0 break if a < b: print "too small" elif a > b: print "too big" else: print "just right" Indentation counts Can have as many elif clauses as you want