Sometimes it's about how you structure things.
IF is a powerful tool, although a little verbose.
I'm going to try to wing it from memory, so this MIGHT not work.
if a==b or a==c or a==d or b==c or b==d or c==d:
a = random.randint(1,9)
b = random.randint(1,9)
c = random.randint(1,9)
d = random.randint(1,9)
However, IF is just my preference.
I believe that your problem is that you used &(and) instead of OR.
If you look at my program, it looks the same as yours, except I used IF and OR.
If you replaced the & in between your equations with an OR, your problem is solved.
OR is the key here. If you use and, then if all of the numbers are equal, your condition is satisfied. However, is one of the groups are unequal, the whole condition fails.
OR, on the other hand, evaluates each equation seperately, and if any of the groups of two are equal, then your condition is satisfied, and you get to re roll your numbers until they are all unequal. Then the condition fails and your program continues.
Not the most efficient way, but it works.
If all that confused you, just remember to use OR instead of &(and).
It will solve your problem.