On 6/12/14 11:55 AM, Marko Rauhamaa wrote:
while not done:Better Python and not bad English, either.
... and taking Marko's good advice, what I think you really wanted: >>> def poplist(L): done = False while not done: yield L[::-1][:1:] L = L[::-1][1::][::-1] if len(L)==0: done=True >>> L=[1, 2, 3, 4, 5, 6, 7] >>> m=[] >>> pop = poplist(L) >>> for n in poplist(L): m.append(n[0]) >>> m [7, 6, 5, 4, 3, 2, 1] >>> -- https://mail.python.org/mailman/listinfo/python-list