Python: Deleting part of list

alist = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
del alist[2:6] # [10, 11, 16, 17, 18, 19]
Advertisements