import re


def remove_comments(text: str) -> str:
    """Remove python-like comments from a string

    Args:
        text (str): String with python-like comments to be removed

    Returns:
        str: String with removed comments
    """

    return re.sub(r"#.*", "", text)