reolace double space ti single space in python' 1

reolace double space ti single space in python’

' '.join(mystring.split())

Here is what the above code is Doing:
1. It’s taking the string and splitting it into a list of words.
2. It’s joining the list of words back together with a single space between each word.
3. It’s returning the result.

Similar Posts