I have a function called evaluate and it is a function that takes time to complete. It then resumes a loop, skipping that iteration:
My code:
array = []#some huge array containing different ways of expressing greetings
def main(resumeLocation):
for a in range(len(array)):
i = array[a]
if a < resumeLocation:
continue
else:
if (i == "Hello")
answer(i, a)
break
def answer(input, resumeLocation):
# process answer
resumeLoop(resumeLocation)
now, in order for the function not to loop infinitely, I need to skip the iteration where I process the answer, so I need to break the loop, call that function, then resume the loop, however, I cannot seem to work out how to do this.
any suggestions are helpful.
Thank you