Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- # Create the window
- window = Tk()
- # Create the canvas
- canvas = Canvas(window, width=200, height=200, bg='white')
- # Create the square
- square = canvas.create_rectangle(0, 0, 200, 200, fill='blue')
- # Pack the canvas
- canvas.pack()
- # Run the Tkinter event loop
- window.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement