python wrote: > I have new a list , when it hava large number of values, I wonna to > delete all the values in it,how to do? > And, if a list have 801 values, I want to get its values index from 300 > to 400, could use list1[300:400],are right me? >
del list1[:] del list1[:-1000] # keep max. last 1000 appended items in the list list1[:]=replace_list ... -robert -- http://mail.python.org/mailman/listinfo/python-list