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 Python Collections (2016, retired 2019) Dungeon Game Movement

Mohammed Jangda
Mohammed Jangda
1,701 Points

("\n") What does this mean? Kenneth never defined it and I have been confused since he started teaching, he is too quick

please help!

2 Answers

Steven Parker
Steven Parker
229,788 Points

That's what is called an "escape" sequence, where both characters together represent just one in the string. That particular one represents the invisible "newline" character, which causes the current line to end and prepares for the next thing printed to be on the next line.

Other common (but not as common) escape sequences are "\t" for tab and "\b" for backspace.

Mohammed Jangda
Mohammed Jangda
1,701 Points

Thank you for your reply! Could you not have just put "break"?

Steven Parker
Steven Parker
229,788 Points

Mohammed Jangda — The word "break" has a different meaning in Python, it's used for loop control. It doesn't represent a new line.

If that answered your question, you can mark it solved by choosing a "best answer".
And happy coding!