the problem i'm having is that every time i go to a new function and then go back to the first one, the count starts over.yo(driver) random(driver) yo(driver). the second time i do yo(driver) the count starts over and if i place count = 0 outside of the function then it comes up as an unresolved reference inside of the function. is there any simple way i can get it keep counting and not start over?
timeout = time.time()+2
def yo(driver):
count = 0
while True:
try:
print("try 1")
count += 1
except:
print("except 1")
else:
print("else 1")
finally:
print("finally 1")
if time.time() > timeout:
print("timeout")
print("count", count)
break
def random(driver):
print("yoyo")
yo(driver)
random(driver)
yo(driver)