On Mon, Oct 13, 2014 at 2:11 PM, emile <em...@fenx.com> wrote: > On 10/13/2014 11:02 AM, Mark Lawrence wrote: > >> Why bother to initialise a counter when you can get the enumerate >> function to do all the work for you? > > > I see it as a question of addressing the audience. > > Emile
I don't agree with the idea of using a counter. Its not pythonic, and I'm assuming the OP is just starting to learn python. Not apropos to the OP, but what came up in my mind was to write a generator function that returns every other line. This would separate the reading from the writing code. > > > > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list