Is there a pythonic way to do this easy and fast with lists ???? . I found some solutions with dict, but it may be slow for large data. In simplest words, find in B the values corresponding to every entry of A.

Example:

```
A = [a,a,b,c,c,c,d,e,e,f,g,g,g,...]
B = [a,1
     b,2
     c,3
     d,2
     e,1
     f,2
     g,5
     ...]

```

Expected result C (length of A)

```
C = [1,1,2,3,3,3,2,1,1,2,5,5,5 ... ]

```