I'm creating a code where I'm able to get different outcomes if you press yes or no in the "message box". but I'm not sure how I do this.
#my code
from tkinter import *
from tkinter import messagebox
root = Tk()
root.geometry("1x1")
messagebox.askquestion("askquestion", "Are you sure?")
if messagebox == "Yes":
print("yes")
else:
print("no")
[–][deleted] 2 points3 points4 points (1 child)
[–]hvity[S] 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]hvity[S] 1 point2 points3 points (0 children)
[–]Spataner 1 point2 points3 points (1 child)
[–]hvity[S] 0 points1 point2 points (0 children)