On Mar 26, 2016 12:50 PM, "beliavsky--- via Python-list" <
python-list@python.org> wrote:
>
> I can use x[::n] to select every nth element of a list. Is there a
one-liner to get a list that excludes every nth element?

[y for (i,y) in enumerate(x) if i % n]
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to