Last Updated: February 25, 2016
·
611
· kamilmichalak

Removing items from list with single line

# Removing items with even-numbered indices
[ list.remove(item) if (list.index(item) % 2 == 0) else item for item in list ]