BeFOR We Begin


#1

I'm not sure if my code was right, and when i try to run it, it'll display all the strings but i get an error with

Oops, try again. It looks like your code did not print "Adam".

This is my code:

names = ["Adam","Alex","Mariah","Martine","Columbus"]
for x in names:
    print names

#2

names is the list itself,
print names
by doing that you're printing list names many times.(exactly 5 times,which is length of names)
look youre using x iterator to iterate/loop over list names,
so to print item from this list, You have to print x ?


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.