I'm working on a program in which I need the index position of a character that is present more than once in a string. I tried using the rfind method but it only returns 1 position(the highest index).
CODE:
word = "SYNONYMS"
I want to get the index values of the character 'S' in this word. Required output: [0, 7]
Thank you for the help in advance.