title: Convert a list of words to list of numbers that were previously assigned in Python(2.7.1)
body: <p>I have a code <code>"aaabbbcccdddeee"</code> that I split up into 3 letter words (such as <code>'aaa'</code>,<code>'bbb'</code>,<code>'ccc'</code> . . . and so on) and assigned a number value to them using </p>
  
  <pre><code>d=dict(zip(('aaa','bbb','ccc','ddd','eee'),('123','234','345','456','567')))
  </code></pre>
  
  <p>If random sequence that has </p>
  
  <pre><code>random='aaabbbdddccceeedddbbbaaaeeeccc'
  </code></pre>
  
  <p>How can I create a list that converts the random sequence into a list composed of the number values that were assigned previously</p>
  
  <p>Example: </p>
  
  <pre><code>random='aaabbbdddccceeedddbbbaaaeeeccc'
  </code></pre>
  
  <p>to produce</p>
  
  <pre><code>'123','234','456','345','567','456','234','123','567','345'
  </code></pre>