Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get first occurrence in list

next(obj for obj in objs if obj.val==5)
Source by www.stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #occurrence #list
ADD COMMENT
Topic
Name
7+5 =