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
Cheri Castro
226 PointsWhat is '\n\' ? What does it really mean?
In my college class, we are using '\n' but, I don't really understand what this means.
1 Answer
Logan R
22,989 PointsThe "n" stands for "newline". When you call print, there needs to be some way of inserting special characters that do special things with ease. To indicate something is a special character, we use "\". Another special character is "\t" for tab.
You can read more about this on Wikipedia:
https://en.wikipedia.org/wiki/Escape_character
Hopefully this satisfies your question!
Cheri Castro
226 PointsCheri Castro
226 PointsAh, thank you. I was looking all through my book and it only describes n as being a variable in certain equations meaning n= 50 or such. I could vaguely understand when would be an appropriate time to use '\n' but I wasn't really understanding what it was. Thank you for that explanation and you followed through and answer my next question about t, before I even had a chance to ask it. So, thank you for that as well.
Logan R
22,989 PointsLogan R
22,989 PointsGlad I could help! If you have any other questions, always feel free to ask :)
Cheri Castro
226 PointsCheri Castro
226 Points:)