Iterating a List

Program

list=["John", "David", "James", "Jonathan"] 
list1=[10,20,30,40]
  
for i in list:   
    # The i variable will iterate over the elements of the List and contains each element in each iteration.     
    print(i)

for j in list1:   
    # The i variable will iterate over the elements of the List and contains each element in each iteration.     
    print(j)



OUTPUT

John
David
James
Jonathan
10
20
30
40