How to make global empty integer?

Viewed 46523

How to declare global empty integer? I have simple code but i don't know how to declare a variable before def. In java I can do just that: public int a; but how to do it in python? Without this, the third if not working

My code:

def abcd:
if s<0.72:
    if e>30:
        a=0
        return a

    else:
        a=0
        return a
else:
    if a == 1:
        a = 1
        return a
    else:
        a=1
        return a
while True:
abcd
4 Answers
Related