undo, clear

# -*- coding: utf-8 -*-
from turtle import *
import sys
sys.setrecursionlimit(20000)
 
def jump(x, y):
    stift.penup()
    stift.goto(x, y)
    stift.pendown()
 
def fuellenumschalten(xdummy, ydummy):
    if stift.filling():
        stift.end_fill()
        stift.fillcolor("")
    else:
        stift.begin_fill()
        stift.fillcolor("black")
 
clear()
stift = Turtle()
stift.speed(0)
stift.shape("circle")
stift.shapesize(0.4, 0.4, 3)
stift.pensize(3)
 
onscreenclick(stift.goto)
onscreenclick(jump, 2)
onscreenclick(fuellenumschalten, 3)
stift.ondrag(stift.goto)
 
onkey(stift.undo, "BackSpace")
onkey(stift.clear, "space")
listen()
mainloop()