Going from Javascript to Python really just means that scope is Satan reincarnated.
With this code, everything is fine:
a = 10
def elFunction():
    print a
    if (4 > 2):
        print a
elFunction()
With this code, I die a little inside
a = 10
def elFunction():
    a += 1
    if (4 > 2):
        print a
elFunction()
Why does this code draw an error?
 
    