Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Python: Deleting part of list

📅 2009-Oct-09 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ deletion, lists, python ⬩ 📚 Archive

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


© 2023 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 Mastodon📧 Email