I'm wondering how I can restart a script without just calling the function itself. You can see the example below. After "two" is printed I want the script to restart itself without just calling one().
import time
zero = 0
def one():
global zero
for i in range(50):
time.sleep(0.5)
zero += 1
print(zero)
if zero == 10:
two()
def two():
print("two")
#Restart the script
one()
whileloop. Such constructs are covered by tutorialsif zero % 10 == 0:?