在我正在编写的一个程序中,turtle的onkey()方法并不能完全满足我的需求。我知道也有onkeypress和onkeyrelease,但都不是我需要的。有没有一种方法可以在按键的情况下继续运行函数?比如num = 0 global num print(num)turtle.listen()
turtle
for count in range(15):turtle.forward(random.randint(0,100)) turtle.right(random.randint(0,90) turtle.forward(random.randint(0,50)) turtle.circle(random.randint(0,50))如果turtle.pos() == turtle.pos():turtle.color(“红色”) turtle.spee