The types are for and while. (Python 3 uses the range function, which acts like xrange). Remember to increase the index by 1 after each iteration. However, there are few methods by which we can control the iteration in the for loop. For example i=1. There are two types of loops are available in python. When do I use for loops? Python map () applies a function on all the items of an iterator given as input. The for loop iterates over the iterable elements whereas the while loop iterates when a condition is True. Visit this page to learn more about Python lambda Function . In Python, there is no C style for loop, i.e., for (i=0; i