Ask coding questions

← Back to all posts
Restart program
duduremiao (0)

Which command I need to use when con == s to back to the start of the progra

SixBeeps (5067)

You need what's called a while loop. It repeats code until a certain condition is met. However, you can also make it so that condition is unreachable, so it repeats forever. It looks like this:

while (true):
    print('This code repeats forever!')

print('This line is never reached')