answer_pressed = False
def evaluate(button):
global answer_pressed
answer_pressed = True
# rest of function here
button.on_click(evaluate)
import time
while answer_pressed == False: # put the interpreter to sleep until the button is pressed.
time.sleep(0.01) # or 0.1 depending on the required resposivity.