On 26/03/16 16:49, beliavsky--- via Python-list 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?

(e for i, e in enumerate(x) if i % n)

K.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to