def first_index(lst, predicate):
    for i, e in enumerate(lst):
        if predicate(e):
            return i
    return None
Test for key (as standard dicts)
dataset/ETHPy150Open openstack/rally/rally/common/utils.py/first_index--crossover with--dataset/ETHPy150Open rene-aguirre/pywinusb/pywinusb/hid/core.py/HidReport.has_key