Find substring in a string : String find : String PYTHON examples


PYTHON examples » String » String find »

 

Find substring in a string




S = 'xxxxSPAMxxxxSPAMxxxx'
where = S.find('SPAM')          # search for position
print where                           # occurs at offset 4

           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo String
» String find