eliminating multiple occurrences of whitespace in a string in python
- by tipu
If I have a string
"this is a string"
How can I shorten it so that I only have one space between the words rather than multiple? (The number of white spaces is random)
"this is a string"