Coding style

PTY ty.2006 at yahoo.com
Mon Jul 17 11:56:34 EDT 2006


Which is better?

lst = [1,2,3,4,5]

while lst:
  lst.pop()

OR

while len(lst) > 0:
  lst.pop()




More information about the Python-list mailing list