title: Enumerate string elements of list
body: <p>I have a list of strings, for example</p>
  <pre><code>users = [&quot;anka&quot;, &quot;anka&quot;, &quot;anka&quot;, &quot;anka&quot;, &quot;timothy&quot;, &quot;timothy&quot;, &quot;timothy&quot;, &quot;donald&quot;, &quot;donald&quot;, &quot;anka&quot;, &quot;anka&quot;, &quot;timothy&quot;, &quot;timothy&quot;]
  </code></pre>
  <p>I would like now to efficiently turn this list into a list of integers by enumerating the strings. The output is</p>
  <pre><code>users = [0, 0, 0, 0, 1, 1, 1, 2, 2, 0, 0, 1, 1]
  </code></pre>
  <p>How is this possible?</p>