About 81,800 results
Open links in new tab
  1. How to ask user 'Do You Want To Continue?' in python using …

    Jan 17, 2022 · You can use input within the while statement condition check. Something like this: while input("Do You Want To Continue? [y/n]") == "y": # do something print("doing something")

  2. python - How do I ask the user if they want to play again and …

    How do I ask the user if they want to play again and repeat the while loop? user = input("Please enter 1, 2, or 3: ") if user == comp. print("Tie game!") elif (user == "1") and (comp == "2") …

  3. I want to have a yes/no loop in my code, but I'm having trouble …

    I would do it the following way: while True: # your code cont = raw_input("Another one? yes/no > ") while cont.lower() not in ("yes","no"): cont = raw_input("Another one? yes/no > ") if cont == …

  4. Python Continue Statement - GeeksforGeeks

    Mar 11, 2025 · We should use the continue statement when we need to control the flow of loops efficiently by skipping specific iterations while still executing the rest of the loop. Here are …

  5. While loop Yes or No Python | Example code - EyeHunts

    Dec 9, 2021 · Use while true with if statement and break statement to create a While loop yes or no in Python. Simple if while condition equal to “N” then wait for the user input of Y before …

  6. while loop in python for do you want to continue - IQCode

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

  7. while loop in python for do you want to continue - GrabThisCode

    Jan 30, 2021 · ## When the program execution reaches a continue statement, ## the program execution immediately jumps back to the start ## of the loop. while True: print('Who are you?') …

  8. Python break and continue (With Examples) - Programiz

    The break and continue statements are used to alter the flow of loops. In this tutorial, you will learn about break and continue in Python with the help of examples.

  9. Python: Continuing to next iteration in outer loop

    I wanted to know if there are any built-in ways to continue to next iteration in outer loop in python. For example, consider the code: for jj in range(200, 400): ...block0... if something: continue. …

  10. Python continue Keyword - W3Schools

    The continue keyword is used to end the current iteration in a for loop (or a while loop), and continues to the next iteration. Use the break keyword to end the loop completely. Read more …

Refresh