import re


def space_sentencestops(text, stop_chars=".;!?,:"):
    """ Space end of sentence punctuation marks e.g. Bad stop.Good stop. --> Bad stop. Good stop. And remove spaces before end marks e.g. Bad .Good --> Bad. Good."""
    # Add a single space after each stop character
    for c in stop_chars:
        rx = f"(\\{c}(?=[a-zA-Z]))"
        text = re.sub(rx, f"{c} ", text)

    # Remove the preceding space before a stop charater
    rx = fr"((?<=[a-zA-Z0-9])\s{{1,}}(?=[{stop_chars}]))"
    text = re.sub(rx, '', text)

    return text