using FOR statement on 2 elements at once python
===

I have the following list of variables and a mastervariable

`a = (1,5,7)`

`b = (1,3,5)`

`c = (2,2,2)`

`d = (5,2,8)`

`e = (5,5,8)`

`mastervariable = (3,2,5)`

I'm trying to check if 2 elements in each variable exist in the master variable, such that the above would show B (3,5) and D (5,2) as being elements with at least 2 elements matching in the mastervariable


I currently have the very unefficient:

    if current_variable[0]==mastervariable[0]:
                if current_variable[1] = mastervariable[1]:
                            True                        
                elif current_variable[2] = mastervariable[1]:
                            True       
                 
      #### I don't use OR here because I need to know which variables match.

    elif current_variable[1] == mastervariable[0]:   ##<-- I'm now checking 2nd element
                etc. etc.

I then continue to iterate like the above by checking each one at a time which is extremely inefficient. I did the above because using a FOR statement resulted in me checking the first element twice which was incorrect:

    For i in a:
          for j in a:
               ### this checked if 1 was in the master variable and not 1,5 or 1,7

Is there a way to use 2 FOR statement that allows me to check 2 elements in a list at once while skipping any element that has been used already? Alternatively, can you suggest an efficient way to do what I'm trying? 