title: Python skipping last element in while iterating a list using for loop
body: <pre><code>class Sample:
  
      def __init__(self):
          self.lst_report_footer_strings = ['Manager', 'Accountant', 'Created By', 
                                           'fifth', '', '']
          int_size_of_string = 0
          lst_temp_report_footer = self.lst_report_footer_strings
          for lst_report_footer_item in self.lst_report_footer_strings:
              print lst_temp_report_footer
              print lst_report_footer_item
              if lst_report_footer_item in ('', ' '):
                  print "Inside if : Item ==" + lst_report_footer_item
                  lst_temp_report_footer.remove(lst_report_footer_item)   
                  print "list after remove == " + str(lst_temp_report_footer)
              else:
                  print "Inside else : length = ", str(len(lst_report_footer_item))
                  int_size_of_string += len(lst_report_footer_item)
  
  
  if __name__ == '__main__':
      ins_class = Sample()
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <pre><code>['Manager', 'Accountant', 'Created By', 'fifth', '', '']
  Manager
  Inside else : length =  7
  ['Manager', 'Accountant', 'Created By', 'fifth', '', '']
  Accountant
  Inside else : length =  10
  ['Manager', 'Accountant', 'Created By', 'fifth', '', '']
  Created By
  Inside else : length =  10
  ['Manager', 'Accountant', 'Created By', 'fifth', '', '']
  fifth
  Inside else : length =  5
  ['Manager', 'Accountant', 'Created By', 'fifth', '', '']
  
  Inside if : Item ==
  list after remove == ['Manager', 'Accountant', 'Created By', 'fifth', '']
  </code></pre>
  
  <p><strong>What i need is....</strong></p>
  
  <pre><code>list after remove == ['Manager', 'Accountant', 'Created By', 'fifth']
  </code></pre>