331319 (2) [Avatar] Offline
I have attached the example to show what I mean. \n appears at the end of anything I write in the text bracket.
Tanmay Bakshi (1) [Avatar] Offline
Hi - it's because the playground does not support multi-line text in the output pane. Since it cannot display another line, it displays "\n" in the output pane, which you are viewing. However, if you were to run this on a real iOS/macOS app, it will not show the "\n".

Also, if you go to the menu: "View -> Debug Area -> Show Debug Area (Command-Shift-Y)", it will toggle the "Debug Area" of the playground, as a horizontal pane on the bottom of your screen.

You can see the result of your "print" statements there, with multi-line support. In this area, you will see that the "\n" gets translated into a new line, since "\n" actually means "New Line".

I'll give you an example. If you enter the following command:
print("Hello, One\nTwo\nThree!")

Then, in the output pane, you see:
"Hello, One\nTwo\nThree!\n"
But in the Debug Area (again, at the bottom of the screen), you should see:
Hello, One

Also, all
statements in Swift (2 and later), have a new line at the end, which shows up in the Playground's output pane.

I hope this answers your question. If not, feel free to write back on the forum, and if you have any more questions, please create another thread.

- Tanmay Bakshi
P.S. Sorry for the late reply!
331319 (2) [Avatar] Offline
Thanks for the detailed reply, makes a lot more sense now!
448571 (3) [Avatar] Offline
This is one of the common problems we facing. Through this post we will make the detailed analysis about it. We sure through your reply we will get the best solution.As part of my job at Laundry service in Ghaziabad i am really happy. I am working hard to make people feeling great.
456899 (1) [Avatar] Offline
This is very nice calendar April 2017