"find the index of a dict within a list, by matching the dict's value","tom_index = next(index for index, d in enumerate(lst) if d['name'] == 'Tom')"