Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get index of substring in liast

index = [idx for idx, s in enumerate(l) if 'tiger' in s][0]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #index #substring #liast
ADD COMMENT
Topic
Name
3+8 =