title: Checking if 2 variables out 3 are equal in python
body: <p>I am making a code where three dice are rolled and if all three dice are equal the values are added. If 2 of the dice are equal then the 2 equal dice values are added and the odd dice value is subtracted from the sum.</p>
  
  <p>This is my code so far</p>
  
  <pre><code>import random
  
  d1 = random.randint(1,6)
  d2 = random.randint(1,6)
  d3 = random.randint(1,6)
  
  print(d1)
  print(d2)
  print(d3)
  
  if d1 == d2 and d2 == d3:
      score = d1 + d2 + d3
  elif d1 == d2 or d1 == d3 or d2 == d3:
  </code></pre>
  
  <p>Now I don't know how I would find out which of the 2 dice are equal to be able to add them together. How would I do this?</p>