I have to create a program that can take a sentence such as
my arms are red, my legs are red and I am red
and output the sentence with the indices of the first occurrence of the word in the sentence, so the desired output of that sentence would be
12341634910114
I have no idea how I would do this.
Thanks