python find first occurrence in list

38

next(obj for obj in objs if obj.val == 5)

Comments

Submit
0 Comments