Ptyhon FOR

why when I run this code it prints the result of (names ) five times.
I know there are five strings but I don’t understand why it prints the same number of time that the number of strings

names = [“Adam”,“Alex”,“Mariah”,“Martine”,“Columbus”]
for strings in names:
print names

1 Like

you print names, which is the array, so each iteration of the loop, you print out the entire array.

1 Like