from typing import Iterable
import re


def clear_stop_words(
    text: str, stop_list: Iterable[str], replace_char: str = " "
) -> str:
    """Replace stop words with specified replace character."""
    pattern = "|".join(stop_list)
    compiled_pattern = re.compile(r"\b(" + pattern + r")\b")
    # ---------------------------- Exert Function -----------------------------
    clear_text = re.sub(compiled_pattern, replace_char, text)

    return clear_text