How to remove newline in string-methods exercise?


Hi, how can i remove this new line space using strip()?
or is there any other way?

Hello @thiyamsureshsingh, the .strip() method removes whitespace from the end and beginnings of strings. If you wanted to get rid of newlines in the middle, you could iterate over the string, and append any item to a new list that isn’t a newline, if that makes sense. Then join that list with an empty string.
I hope this helps!