Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Python: Enumerate list using index & values

📅 2009-Oct-02 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ enumeration, lists, python ⬩ 📚 Archive

alist = [10, 11, 12, 13, 14, 15] for idx, val in enumerate(alist):     print(i, j) # 0 10, 1 11, 2 12, 3 13, 4 14, 5 15


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧