avatar Bite 118. List exercise: return first occurrence indices of duplicated words

In this Bite you are presented with a list of words. Loop through them and find all the words that are duplicated. Of those return the (0-based) indices of the first occurrence.

Example: ['this', 'is', 'a', 'new', 'bite', 'I', 'hope', 'this', 'bite', 'will', 'teach', 'you', 'something', 'new'] would return [0, 3, 4], because this, new, and bite are duplicated and are at index 0, 3 and 4 respectively.

Login and get coding
go back Intermediate level
Bitecoin 3X

Will you be the 177th person to crack this Bite?
Resolution time: ~27 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 2.3 on a 1-10 difficulty scale.
» You can do it! 😌

Focus on this Bite hiding sidebars, turn on Focus Mode.

Ask for Help