list.clear() missing?!?

Ville Vainio vivainio at gmail.com
Tue Apr 11 11:01:20 EDT 2006


I tried to clear a list today (which I do rather rarely, considering
that just doing l = [] works most of the time) and was shocked, SHOCKED
to notice that there is no clear() method. Dicts have it, sets have it,
why do lists have to be second class citizens?




More information about the Python-list mailing list