I want to make a simple hangman game with the tkinter module on Python 3. I'm done making all the alphabet buttons.
from tkinter import *
from tkinter import messagebox
top = Tk()
top.resizable(0,0)
top.geometry("300x250")
def helloCallBack():
msg = messagebox.showinfo( "Hello Python", 'HI')
def buttonhuruf():
A = Button(top, text = "A", command = helloCallBack)
B = Button(top, text = "B", command = helloCallBack)
C = Button(top, text = "C", command = helloCallBack)
A.place(x = 50,y = 110)
B.place(x = 70,y = 110)
C.place(x = 90,y = 110)
buttonhuruf()
top.mainloop()
How can I make each button be an input variable, like if I press the A Button, the variable press = 'A'