結果 : how to get index of repeated elements in string python