A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string). With the for loop we can execute a set of statements, once for each item in a list, tuple, set etc. Similarly to while loop, a for loop can also use the key words: break, continue, else. To loop through a set of code a specified number of times, we can use the range() function.