How to remove new line. | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

How to remove new line.

I created a number list. And print one by one in new line. But after the last number code creats a new line. I don't want it how do i remove it.

29th Nov 2020, 4:42 PM
Tharindu Warnapura
Tharindu Warnapura - avatar
4 Antworten
+ 1
Try \r ?
29th Nov 2020, 4:55 PM
CHERIEF Houcine Abdelkader
CHERIEF Houcine Abdelkader - avatar
+ 1
I've just say' try'
29th Nov 2020, 5:05 PM
CHERIEF Houcine Abdelkader
CHERIEF Houcine Abdelkader - avatar
29th Nov 2020, 5:09 PM
CHERIEF Houcine Abdelkader
CHERIEF Houcine Abdelkader - avatar
+ 1
You can do like this: Print the first element Foreach element from the 2nd until the last: print new line and then print it. like this https://code.sololearn.com/cXLRr3ud1Oes/?ref=app
29th Nov 2020, 5:16 PM
CHERIEF Houcine Abdelkader
CHERIEF Houcine Abdelkader - avatar