python find first occurrence in list

31

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

Comments

Submit
0 Comments