I wanna click once to set the origin of the line then move the mouse and click the second time to draw the line from the previously set origin to the current location of the mouse pointer
I tried setpos(x,y) and then goto(x,y) but that didnt work Can you help me
import turtle
beni=turtle.Screen()
beni.setup(900,700)
t=turtle.Turtle()
def freehandmode(x, y):
t.ondrag(None)
t.goto(x, y)
t.ondrag(freehandmode)
t.ondrag(freehandmode)
def linemode(x, y):
t.setposition(x,y)
t.goto(x, y)
turtle.mainloop()