Python Introducing Lists Using Lists Continental

Callum Anderson
Callum Anderson
1,616 Points

Trying to add bullet points (*) to list using finction the in loop function

I'm unsure what to add as in the preview it's showing the code perfectly like the challenge asks me to do but coming up with an error about my first listing (asia) saying it cannot be found but clearly in preview is there with the function in use
continents = [
    'South America',
    'North America',

for continent in continents:
    print("*" + continent)
Callum Anderson
Callum Anderson
1,616 Points

Nevermind I got it haha! Anyone looking at this post also wondering you add a space to the asterisk line, like this.

print("* " + continent) not sure why as no need to add space when following along from previous video but hope this helps!

1 Answer

Steven Parker
Steven Parker
201,320 Points

Adding a space prevents the "bullet" from running up against the word (and conforms to the model the instructions asked you to follow).

Another way to get proper spacing is to include the bullet as a separate argument:

    print("*", continent)