def index_safe(lst, itm):
    """
    Returns LST.index(ITM), but returns None if not
    found, rather than an exception.
    """
    try:
        return lst.index(itm)
    except ValueError:
        return None