here's my code i'm using the python turtle package:
#setup
import turtle
wn = turtle.Screen()
obj = turtle.Turtle()
go = True
def restart(x, y, go = go):
go = False
print(go)
wn.onscreenclick(restart)
wn.listen()
#main loop
while go:
wn.update()
obj.forward(0.1)
print("game ended")
when i click the screen it should stop do the code after. the loop won't stop and it won't say "game ended" i am not sure why.
I need help. thanks!