For loop


#1

How should I correct this ?


#2

Hi
I suppose that you want to print out each element of the array "names" individually? If yes, then you should replace print names by print name. You can understand the for loop by reading the explanations on
https://www.codecademy.com/courses/python-beginner-en-IZ9Ra/0/1?curriculum_id=4f89dab3d788890003000096
Basically, the line for name in names: is read as so: for every element "name" contained in the array "names" defined before, do something which is described hereunder. In this case, the command which is executed for every element in "names" is print name. This will print every element "name" of the array, one after the other, iteratively.


#3

But changing names to name won't solve the problem right ?

"name" and "names" are just variable names given by the user !


#4

Oh yeah..
Thanks @thebelgian1

Got it !


#5

thanks for the help.