def remove_comment(line, marker="##"):
    """Return the given line, without the part which follows the comment
    marker ## (and without the marker itself)."""
    i = line.find(marker)
    if i < 0:
        return line
    else:
        return line[:i]