Mega Code Archive

 
Categories / Python Tutorial / String
 

Find the index of a substring

searchStr =  "Red Blue Violet Green Blue Yellow Black" print searchStr.index("Blue")