While a while loop repeats indefinitely as long as a condition is met, a for loop is a bit more complicated: it iterates (or repeats) for as long or as many times as we specify it.
In a for x in y loop, a y has to be a list of multiple data while the x has to be an element of that list. For example, in our variable text , the text should be our y and the individual characters should be our x.
To better understand it, let’s try it in action!