Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- window = Tk()
- def button1_func():
- print("Hello World!")
- def button2_func():
- print("Goodbye World!")
- button1 = Button(window, text="Click", command=button1_func)
- button2 = Button(window, text="Click2", command=button2_func)
- #Add the button to the window.
- button1.pack()
- button2.pack()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement