enumerate

This commit is contained in:
Mert Gör 🇹🇷 2023-06-11 16:06:16 +03:00
parent afdf73b772
commit f8164789fa
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9

View File

@ -0,0 +1,4 @@
l = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
result = [val for index, val in enumerate(l) if index % 2 == 0]
print(result)