It seems so “dirty” emptying a list in this way:

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

Does a clear way exist to do that?

7 Answers
7

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *