Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Introducing Lists Using Lists Continental

where should I use /n here in this code and why so is a must ?

Please find the attached code and tell me why is a bummer coming for not entering (/n)

continents.py
continents = [
    'Asia',
    'South America',
    'North America',
    'Africa',
    'Europe',
    'Antarctica',
    'Australia',
]
# Your code here
for i in continents:
      print("*" + i )

1 Answer

\n within a string creates a newline.

It's similar to hitting "return" or "enter" on the keyboard, it will start a new line of text.

Where should i use it in the above code?

print("*" + i + "\n")