import re


def remove_subword_tokens(sentences, subword_token):
    """
    Removes all subword tokens from a list of sentences. E.g. "The bro@@ wn fox ." with
    subword_token="@@" will be turned into "The brown fox .".

    :param sentences: a list of sentences
    :param subword_token: the subword token.
    """
    subword_token = subword_token.strip()
    clean_sentences = []
    for sentence in sentences:
        clean_sentences.append(re.sub(f"({subword_token} )|({subword_token} ?$)|"
                               f"( {subword_token})|(^ ?{subword_token})", "",
                               sentence))
    return clean_sentences