I am trying to remove the spaces between sentence ending word and dot.
text = 'some sentence .'
What I have tried so far:
import re
line = 'some sentence .'
re.sub('\s+(\.)', '', line)
But it removes the dot as well. Desired output would be like that
some sentence.