String search : String find : String PYTHON examples


PYTHON examples » String » String find »

 

String search


String search: search for position


S = 'xxxxSPAMxxxxSPAMxxxx'
where = S.find('SPAM')          # search for position
print where                           

S = S[:where'EGGS' + S[(where+4):]
print S

           
       



Leave a Comment / Note


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


PYTHON examples

 Navioo String
» String find