def remove_ex_comment(line):
    """
    If a line ends with '#ex' and is only a comment, returns an empty
    string, otherwise return the string.
    """
    if line.startswith('#') and '#ex' in line:
        return ''
    else:
        return line