import time
from tkinter import *
tk=Tk()
canvas=Canvas(tk,width=400,height=400)
canvas.pack()
canvas.create_polygon(10,10,10,60,50,35)
for a in range (0,50):
    for x in range(0,60):
        canvas.move(1,5,0)
        tk.update()
        time.sleep(0.02)
    for i in range(0,60):
        canvas.move(1,-5,5)
        tk.update()
        time.sleep(0.02)
    for b in range(0,60):
        canvas.move(1,5,0)
        tk.update()
        time.sleep(0.02)
    for c in range(0,60):
        canvas.move(1,-5,-5)
        tk.update()
        time.sleep(0.03)
    
        
    
