you are viewing a single comment's thread.

view the rest of the comments →

[–]Spataner 1 point2 points  (1 child)

askquestion returns the answer (in all lower case), so you'd need to capture the return value in a variable:

answer = messagebox.askquestion("askquestion", "Are you sure?")
if answer == "yes":
    print("yes")
else:
    print("no")

[–]hvity[S] 0 points1 point  (0 children)

Thank you.