You need to loop over b
, either setting each element to the empty list or deleting the contents of that element:
for i in xrange(len(b)):
b[i] = []
or
for i in xrange(len(b)):
del b[i][:]
3
solved Delete items from list of list
You need to loop over b
, either setting each element to the empty list or deleting the contents of that element:
for i in xrange(len(b)):
b[i] = []
or
for i in xrange(len(b)):
del b[i][:]
3
solved Delete items from list of list