How do you create global variables without typing "global" in each function? : I'm trying to create a global variable, but from what I know you need to type "global" in every function.

This example is in Python 2.7:
    
    a = 10
    
    def change():
        global a
        a = 2
        print a

    def reverse():
        global a
        a = 10
        print a

    // Output:
    // 2
    // 4

I'm trying to re-create the code above without the use of 'global' for every variable in every function I am going to create. Is there a better way to do this?