I've already managed to remove the space at the beginning and end of the string with the function strip () but I do not know how to eliminate when in the text there are more than two spaces between words
for example:
for example:
a = ' this is the test ' a = a.split() print a 'this is the test'