title: How to map one list to another in python?
body: <pre><code>['a','a','b','c','c','c']
  </code></pre>
  
  <p>to </p>
  
  <pre><code>[2, 2, 1, 3, 3, 3]
  </code></pre>
  
  <p>and </p>
  
  <pre><code>{'a': 2, 'c': 3, 'b': 1}
  </code></pre>