how to restart loop python

Solutions on MaxInterview for how to restart loop python by the best coders in the world

showing results for - "how to restart loop python"
Theo
19 Apr 2019
1i=2
2while i < n:
3    if something:
4       do something
5       i += 1
6    else: 
7       do something else  
8       i = 2 #restart the loop