PyEzy

Loops

Python has two types of loops: for loops and while loops.A for loop is used to iterate over a sequence of values (such as a list, tuple, or string) and perform a set of statements for each item in the sequence.A while loop is used to repeatedly execute a set of statements as long as a certain condition is true..

While Loops