How to make my code more Pythonic?
<p>I need to replace some letters into a List with numbers (each letter is encoded to a number). I used this structure:</p>

<pre><code>r = []
for x in some_list:
    if x in "ABCDE":
        r.append({"A":10, "B":20, "C":30, "D":40, "E":50}[x])
    else:
        r.append(int(x)) # convert string digit to digit
some_list = r
</code></pre>

<p>(some_list being mutable as in this code).</p>

<p>I wish to ask if there are some more compact structures in python (less code) that can make this encoding and run faster.</p>
