Python for Everybody - Iterations: Definite Loops

Tell us what’s happening:

How does this work , where and when do we need to use loop statement, how can we add list inside the for loop

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36

Challenge Information:

Python for Everybody - Iterations: Definite Loops

Hi and welcome to the forum! Not sure I understand your question but:

for i in [2,1,5]:
    print(i)

This loop will assign each element in the list to i in tun and execute print on each succession of the loop.

You can read more about for loops:
https://www.w3schools.com/python/python_for_loops.asp

https://www.geeksforgeeks.org/python-for-loops/