how to leave a whlie loop but continue on for loop 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: while loop in python for do you want to continue

while input("Do You Want To Continue? [y/n]") == "y":
    # do something
    print("doing something")