title: Python for statement. Has to break on the last data of the loop
body: <p>I have to process 300 rows and write the data on excel file using openpyxl. I'm using for loop to process the rows. But if 'End' word comes, then the loop breaks and goes to the 501st row. </p>
  
  <p>My issue is that the on 300th row the 'End' word is there. So the last row and 'End' word comes together. Logically, the program should break and go to 501 row. But my program ignores the 'End' word, process the 300th row and jumps to 301st row. </p>
  
  <pre><code>for count_300 in range (155, 300):
              cell_value_Y = ws.cell(row = row_break, column = Col_Y).value
              if( cell_value_Y == 'End') and (re.search(r'\Slide\b', cell_value_Z)): 
                  row_break += 1
                  loop_break = 'TRUE'
                  print ('Break inside the loop =', cell_value_Y)
                  break
  </code></pre>