# find index of second occurence of substring in string idx = string.find(substring, string.find(substring) + 1)