do you want to continue in python code example
Example 1: continue python
The continue statement in Python returns the control to the beginning of the
while loop. The continue statement rejects all the remaining statements
in the current iteration of the loop and moves the control back to the top of
the loop.
The continue statement can be used in both while and for loops.
Example 2: continue statement python
import numpy as np
values=np.arange(0,10)
for value in values:
if value==3:
continue
elif value==8:
print('Eight value')
elif value==9:
break
Example 3: while loop in python for do you want to continue
while True:
if input('Do You Want To Continue? ') != 'y':
break
Example 4: while loop in python for do you want to continue
while input("Do You Want To Continue? [y/n]") == "y":
print("doing something")