Matching Letters to Numbers

Hi, everyone I am new to grasshopper, but i like it already!

 

What i want to do is match a List of Letters to specific numbers.

Lets say i have

 

A

D

E

G

A

D

 

I want to get 

 

1

4

6

7

1

4

 

Is like saying A=1, D=4, E=6, G=7. The series of Letters is Long but the different letters are only 10 I don't know if that makes any difference.

 

Thanks!