1# Python list
2my_list = [1, 2, 3]
3
4# Python automatically create an item for you in the for loop
5for item in my_list:
6 print(item)
7
8
1List<int> list = new List<int> { 1, 2, 3, 4, 5 };
2//For Loop
3for (int i = 0; i < list.Count(); i++)
4{ Console.WriteLine(list[i]); }
5
6//For Each Loop
7foreach (int item in list)
8{ Console.WriteLine(item); }