DEV Community

Python's enumerate function

Micah Gilbert on September 18, 2019

This is just a quick post because I've seen some python beginners make some functions that are really in need of enumerate, but they don't know it ...
Collapse
 
anshsaini profile image
Ansh Saini

Last line of your code:

new_arr = [letter for index,letter in test_letters if index % 2 == 0 and letter in vowels]

you forgot to actually use the enumerate function 😂😂

Collapse
 
micahsgilbert profile image
Micah Gilbert

Wow! I can't believe I missed that. Fixed.