+ 1

String Manipulating

I have three string and I’m trying to write a function that solve my problem. It take a string with some extra space around and I’m trying to cleaning it up so it looks pretty nice. Between each word it has one space until the last two words. It depends how many spaces is between them it returns it just like it passed in. See my example: https://code.sololearn.com/cgSraXYf0fiS/?ref=app

17th Apr 2022, 2:12 AM
Yones Mussa
3 Respostas
0
https://code.sololearn.com/c1lm0XjwZzLO/?ref=app Here is the solution
17th Apr 2022, 6:48 AM
Yones Mussa
+ 1
Thats not the case in here Ani Jona 🕊. If i wanna to replace all spaces this woulf be good idea. But i wanna replace all extra spaces except the last one. I wanna to keep the spaces.
17th Apr 2022, 6:42 AM
Yones Mussa
0
Ani Jona 🕊 I appreciate your time :)
17th Apr 2022, 6:53 AM
Yones Mussa