title: How to find alternating repetitive digit pair?
body: <p><code>121426</code> &lt;- Here, 1 is an alternating repetitive digit.</p>
  
  <p><code>523563</code> &lt;- Here, NO digit is an alternating repetitive digit.</p>
  
  <p><code>552523</code> &lt;- Here, both 2 and 5 are alternating repetitive digits.</p>
  
  <p><code>333567</code> &lt;- Here, 3 is an alternating repetitive digit.</p>
  
  <p>I found <code>re.findall(r'(?=(\d)\d\1)',P)</code> as the solution in editorial but not able to understand it.</p>
  
  <p>Edit - Not allowed to use <code>if</code> conditions.</p>