title: Double Check of entered PIN for equality
body: <p>I need to write a python code which checks for equality for the entered pin second time and then proceeds further. Here is how my code goes:</p>
  <pre><code>id1 = int(input(&quot;Enter 4-digit account pin: &quot;))
  id2 = int(input(&quot;Re-Enter 4-digit account pin for confirmation: &quot;))
  if id1 == id2:
      id = id1
  else:
      id2 = int(input(&quot;Incorrect pin.. Please Re-enter: &quot;))
  </code></pre>
  <p>Here after my pin gets verified it needs to get assigned to a variable named <code>id</code>. But the above code works only when I enter the incorrect pin once. If I enter again, the code continues to the next step. I want the code to repeat the equality check until both the entered pins are equal and after confirmed as equal, needed to get assigned to the variable <code>id</code>. Please help.</p>