Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tkinter as tk
- def write_text():
- print("thank you for choosing Trump!")
- parent = tk.Tk()
- frame = tk.Frame(parent)
- frame.pack()
- text_disp= tk.Button(frame,
- text="Trump",
- fg="red",
- command=write_text
- )
- text_disp.pack(side=tk.LEFT)
- exit_button = tk.Button(frame,
- text="Biden",
- fg="blue",
- command=write_text)
- exit_button.pack(side=tk.RIGHT)
- parent.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment