def remove_suffix(string: str, suffix: str):
    """
    Removes a suffix from a string if present.

    Args:
        string (`str`): The string to remove the suffix from.
        suffix (`str`): The suffix to remove.

    Returns:
        The string without the suffix.
    """
    return string[: -len(suffix)] if string.endswith(suffix) else string[:]