Stop event in python

Hello
I want to stop event at any point in python.
Is there way to make that?

Hello @Plamena_Nikolova,
One way to do it is like in the example: Stopwatch in Python
The trick is, first, to use a condition like:

if time_go <= 100:

for an action to take place, and then to make a stop function that sets this variable a bit higher, for example:

def stop ():
global time_go
time_go=101

You can always call the stop function with an event like:

stop_button.input.on_click(stop)

I hope this makes sense to you, a lot of success!

Oh ok
Please tell me if you find out🤗