Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python index method

my_string = "Hello World!"

my_string.index("l") # outputs 2
# this method only outputs the index of the first "l" value in the string/list
 
PREVIOUS NEXT
Tagged: #python #index #method
ADD COMMENT
Topic
Name
2+5 =