Python Project Thread Shed

I am currently on the thread shed project and I am confused about the output in step 4. Step 3 asks us to split around commas, which I did. However, when I print to the console in step 4 there are many escape characters “\n” printed. I do not know why this is happening. I watched the walkthrough video and his code also outputs the “\n” characters but there is no explanation as to why.

I just finished the strings module and never encountered anything like this. If someone could provide an explanation I would greatly appreciate it.
Here is the link: Python Project Thread Shed - YouTube
At 2:23 is when he prints the string to the console. When you look at the console you’ll see the characters randomly placed throughout.

The \n character is simply a text representation of a new line, so that you can represent line breaks with an inline formatting. Therefore if you look you’ll see that they correspond to the line breaks in the actual text up to line 107.

1 Like

Thanks for the reply I understand it now. Just was confused because in previous lessons we have split multiline strings but the \n character did not show up to the console.