Befor we begin


#1



https://www.codecademy.com/courses/python-beginner-en-IZ9Ra/0/1?curriculum_id=4f89dab3d788890003000096

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


To print out all the elements in the list (names)


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


#2

names is the whole list, thanks to your for loop item contains each item from the list, so by printing item, you print each item of the list


#3

ive been having troubles with ths one too i dont quite get the error


#4

please post your code, error message and question. Otherwise, its difficult for us to help you


#5

the hint says "Look at the sample code in the instructions if you need help!"

sample code =
a = ["List of some sort”]
for x in a:
# Do something for every x

idk why it says it didn't print adam because in the output it shows adam in the list.


#6

this is the output of your code:

['Adam', 'Alex', 'Mariah', 'Martine', 'Columbus']
['Adam', 'Alex', 'Mariah', 'Martine', 'Columbus']
['Adam', 'Alex', 'Mariah', 'Martine', 'Columbus']
['Adam', 'Alex', 'Mariah', 'Martine', 'Columbus']
['Adam', 'Alex', 'Mariah', 'Martine', 'Columbus']

but it should print each name of the list:

Adam
Alex
Mariah
Martine
Columbus

the loop iterator contains each name/element from the list in order/sequence


#7

Thanks for your help finally figured out what I was doing wrong.


#8