Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Introducing Lists Using Lists Continental

not sure what to do?

not sure what to do?

continents.py
continents = [
    'Asia',
    'South America',
    'North America',
    'Africa',
    'Europe',
    'Antarctica',
    'Australia',
]
for continent in continents: 
    print('*', continent)

1 Answer

efsher you need to add a space after the star while still in the quotations.

PS this might help you for the next question from Alex Koumparos 3 hours ago Hi yc5,

Strings behave, in most respects, like lists. For example, just like we could do this with a list:

my_list = ['h', 'e', 'l', 'l', 'o'] my_list[1] # will access the element at index 1, i.e., 'e' We can do the same thing with a string:

my_string = "hello" my_string[1] # will access the character at index 1: 'e' Now we know how to access an element at a position, we can put that in the if statement:

my_string = "hello" if my_string[1] == "e": print("the character is 'e'") Often, when dealing with strings, we want our tests to be case insensitive. One way we can do this is to ensure that regardless of the case we are being passed, we only look at the lowercase version of it:

my_string = "hELlO" if my_string[1].lower() == "e": print(my_string[1]) Hope that clears everything up for you

Cheers

Alex

yochel lehyos thta i dont know what your talking about

yc5 Think he's on task 2 here.