Link 2 variables together

44 Views Asked by At

I wanted to know how to match a string between the column. For ex:

A.      B.     C.    D.     E.    F. 
1.       2.     3.     4.     5.    6

In above example let Alphabet be column name and digits are considered as values in the column.

So, i want to match Column A , Value 1 and Column E , Value 5. Values in Column A and E is different.

I'm using something like (A + '.*' + E) To get something like - 1. 5.

Any help is really appreciated.

Thanks, :)

1

There are 1 best solutions below

1
Elodin On

Why not just use dictionaries?

>>>dic = {'A': 1, 'B': 2}
>>>print(dic[A])
1

I hope this helps.