Using a list as a key to match to another
<p>I have 4 lists and I need to match them using the first two as a key:</p>

<pre><code>keyNumbers = [3, 2, 1, 4, 5]
keyLetters = ['E', 'D', 'C', 'B', 'A']
numbers = [3, 2, 4, 1, 5]
letters = []
</code></pre>

<p>I want it to work so that letters would be edited for
It should also work with duplicated numbers or letters</p>

<p>Expected Output: E, D, B, C, A</p>

<p>Using all the four lists, you could do:</p>

<pre><code>&gt;&gt;&gt; keyNumbers = [3, 2, 1, 4, 5]
&gt;&gt;&gt; keyLetters = ['E', 'D', 'C', 'B', 'A']
&gt;&gt;&gt; numbers = [3, 2, 4, 1, 5]
&gt;&gt;&gt; letters = []
&gt;&gt;&gt; temp = dict(zip(keyNumbers,keyLetters))
&gt;&gt;&gt; ','.join([temp[i] for i in numbers])
E, D, B, C, A
</code></pre>

python