def has_exactly_one(iterable):
    """Does `iterable` have exactly one non-None element?"""
    test = (x is not None for x in iterable)
    if sum(test) == 1:
        return True
    else:
        return False