Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Python: Deleting part of list

📅 2009-Oct-09 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

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