This code is from another user that had questions but I want to go a bit further. This button press will only print back to the console. What if I want this answer to print to a text box, how would I write that code?
import tkinter
from tkinter import Button
top = tkinter.Tk()
def callback():
print ("click!")
button = Button(top, text="OK", command=callback)
top.mainloop()