Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to get the index of the first integer in a string python

s = 'xdtwkeltjwlkejt7wthwk89lk'

for i, c in enumerate(s):
    if c.isdigit():
        print(i)
        break
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #index #integer #string #python
ADD COMMENT
Topic
Name
5+2 =