About 271,000 results
Open links in new tab
  1. How can I make my program return to the beginning in Python?

    3 I'm a really new programmer, just programing for fun. I usually write my programs with a series of while loops to get to different sections of the program at different times. It's probably not the best way, but …

  2. python - How to make program go back to the top of the code instead …

    I'm trying to figure out how to make Python go back to the top of the code. In SmallBasic, you do start: textwindow.writeline("Poo") goto start But I can't figure out how you do that in Py...

  3. How do you create different variable names while in a loop?

    It's simply pointless to create variable variable names. Why? They are unnecessary: You can store everything in lists, dictionarys and so on They are hard to create: You have to use exec or globals() …

  4. python - looping back to specific point in code - Stack Overflow

    You can bring the raw_input step into a while loop and only exit if a valid response was received. I added a couple of comments to explain what's going on.

  5. python - How to emulate a do-while loop? - Stack Overflow

    1125 I need to emulate a do-while loop in a Python program. Unfortunately, the following straightforward code does not work:

  6. Python loop to run for certain amount of seconds - Stack Overflow

    I have a while loop, and I want it to keep running through for 15 minutes. it is currently: while True: #blah blah blah (this runs through, and then restarts. I need it to continue doing this ...

  7. python - How to repeat a while loop a certain number of times - Stack ...

    Jan 13, 2018 · A tutorial might help you understand the logic of Python loops. You can visualise the execution of your Python program on Pythontutor. This allows you to observe intermediate variables …

  8. python: restarting a loop - Stack Overflow

    Feb 16, 2016 · Changing the index variable i from within the loop is unlikely to do what you expect. You may need to use a while loop instead, and control the incrementing of the loop variable yourself.

  9. While Loop Guessing Number Game - Python - Stack Overflow

    Sep 5, 2014 · Closed last year. I'm trying to make a 'guess the number between 1-10' game but the while loops seems to keep running. I want to program to let the user guess a number then display if …

  10. loops - Is there a "do ... until" in Python? - Stack Overflow

    Jun 21, 2015 · 337 There is no do-while loop in Python. This is a similar construct, taken from the link above.