Python List with FOR Loop

  • Post category:List

The for loop is used to iterate over a sequence (list, tuple, string) or other iterable objects.

In this blog post, you will learn how to use python list with for loop.

Step 1: Create a list

my_list = [1, 2, 3, 4, 5]

Step 2: Print the list using FOR loop

for i in my_list:
    print(i)

Output:

1
2
3
4
5