Answers for "python how to restart a for cicle"

1

python restart script

sys.stdout.flush()
os.execl(sys.executable, 'python', __file__, *sys.argv[1:])
Posted by: Guest on August-06-2021
1

how to restart loop python

i=2
while i < n:
    if something:
       do something
       i += 1
    else: 
       do something else  
       i = 2 #restart the loop
Posted by: Guest on April-28-2021

Python Answers by Framework

Browse Popular Code Answers by Language