How to empty a list?

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

Leave a Comment