create a function to store the mouse clicks and redraw from the mouse clicks in turtle.
import turtle def draw_line(x, y): global mouse_actions mouse_actions.append((x, y)) turtle.goto(x, y) def main(): global mouse_actions mouse_actions = [] turtle.onscreenclick(draw_line) turtle.mainloop() main()