title: In the function the for loop misses one item on the list
body: <p>I have a function that needs the find the straight numbers in list like 0, 1, 2, 3 (they need to be at least 3 or max 5)(and they need to be in the same number group which has 13 numbers in it like 0-12 13-25 etc.)In the function when it finds a straight number group and writes it on a different list it pasts the next number that needs to see.(Found straight number groups needs to be separated with &quot;-1&quot;)</p>
  <p>Input example: 0 1 2 14 15 16</p>
  <p>Expected Output: 0, 1, 2, -1, 14, 15, 16, -1</p>
  <p>Output: 0, 1, 2, -1</p>
  <p>I tested out and if I give one more number to be in the second found straight number groups it works but it still passes the next number found after the first group.
  Here is the used functions.</p>
  <pre><code>def straightNumber(array):
      backu = array[:]
      answer = []
      result = 0
      for item in backu:
          preRes = 1
          for n in range(1, 5):
              if item + n in backu and color_finder(item) == color_finder(item + n):
                  preRes += 1
          if preRes &gt; 2:
              for n in range(0, preRes + 1):
                  if item + n in backu:
                      answer.append(item + n)
                      backu.remove(item + n)
              result += 1
              answer.append(-1)
      return result, backu, answer
  
  
  def color_finder(item):
      if 0 &lt;= item &lt;= 12:
          return &quot;y&quot;
      elif 13 &lt;= item &lt;= 25:
          return &quot;b&quot;
      elif 26 &lt;= item &lt;= 38:
          return &quot;r&quot;
      elif 39 &lt;= item &lt;= 51:
          return &quot;bl&quot;
  </code></pre>
  <p>Note: The color_finder function is to help which number group of 13 is the given number in.</p>