title: how do i reduce the amount of if statements in my code?
body: <p>so my code has a lot of if statements:</p>
  <pre><code>            rnrp += 1
          if a100 == b100:
              rnrp += 1
          if a10 == b10:
              rnrp += 1
          if a1 == b1:
              rnrp += 1
  </code></pre>
  <p>and:</p>
  <pre><code>            if b1000 == a100:
                  rnwp += 1
                  break
              if b1000 == a10:
                  rnwp += 1
                  break
              if b1000 == a1:
                  rnwp += 1
              break
          while true:
              if b100 == a1000:
                  rnwp += 1
                  break
              if b100 == a10:
                  rnwp += 1
                  break
              if b100 == a1:
                  rnwp += 1
              break
          while true:
              if b10 == a1000:
                  rnwp += 1
                  break
              if b10 == a100:
                  rnwp += 1
                  break
              if b10 == a1:
                  rnwp += 1
              break
          while true:
              if b1 == a1000:
                  rnwp += 1
                  break
              if b1 == a100:
                  rnwp += 1
                  break
              if b1 == a10:
                  rnwp += 1
              break 
  </code></pre>
  <p>as you can see this is a lot of if statements, the first is fine, but the second needs improvements. Also  what the second code is trying to accomplish is checking each place of b (100's place, 100's place, 10's place etc..) matches any of the places of a. <strong>How can I shrink the amount of if statement's in the second part of the code?</strong> <strong>this post has been answered by  jasonharper (I cant find the button as of right now so I'm just putting it in the question) thanks!!</strong></p>