I have function AB which has 1 parameter, and AB has a bunch of loops and I have a counter which keeps track of how much it loops. It (must) returns an either True or False answer.
I have a second function called AC which calls upon 2 instances of AB with different things for the parameters and compares them like so
if (AB(option1) == True and AB(option2) == False):
result = "Option1 Wins"
elif (AB(option1) == False and AB(option2) == True):
result = "Option2 Wins"
if (AB(option1) == True and AB(option2) == True):
result = ??
however if both cases are 'True', I need to know which case reached 'True' first, so this means I would need to know how many times it loops (i need to know the value of the counter variable)
How can I access the variable?
I was thinking of making a helper function to access it but I'm not sure if that's possible/how to do that
ABonly returnTrueorFalse? If we can return more than that it helps.option1?