def remove_comments(line, comment_separator='#'):
    """
    Remove comments from a line

    :param line: Line to remove comments from
    :type line: str
    :param comment_separator: Delimiter for comments
    :type comment_separator: str
    :rtype: str
    """
    return line.split(comment_separator)[0].strip()
