On Apr 16, 9:26 am, Yves Dorfsman <[EMAIL PROTECTED]> wrote: > If we do: > lines[:] = [line.rstrip('\n') for line in lines] > > We reuse an existing list, therefore we are saving the time it takes to > create a new list ? So this is a performance issue ?
I think it's more of a reference issue. You may have other labels already pointing to 'lines', if you want them to refer to the same, rstrip'd list, you'd do an in-place update like this. - alex23 -- http://mail.python.org/mailman/listinfo/python-list