While loop

count = 0
while count <= 4:
    #Next loop
    print(count)
    count += 1


#A 1 line while loop (the ; character denotes a seperate line of code)
count = 0
while count <= 4: print(count); count += 1

Loop Control

Exit loop
    break
Exit and start next iteration
    continue
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published. Required fields are marked *