PTY wrote: > Which is better? > > lst = [1,2,3,4,5] > > while lst: > lst.pop() > > OR > > while len(lst) > 0: > lst.pop() >
I think the first one is better, but if all you are doing is removing all the items in the list, this is definitely better: lst = [] -Don -- http://mail.python.org/mailman/listinfo/python-list