title: How can find all the indices of an elements which apperas multiple times in a particular list in python?
body: <p>For example, if I have a list of words like <code>['to', 'be', 'or', 'not', 'to', 'be']</code>,
  now for some reason in a for loop or in a function definition with <code>list.index(value)</code> method, I want to find all the indices of each word but when I reach up to 'to' word (2nd occurrence) it gives me an index of its first occurrence itself.
  How can I resolve this?</p>