def drop(lst, n):
for i,x in enumerate(lst):
if (i+1) % n != 0:
yield x
Sunday, November 2, 2008
99 problems - python - 16
Drop every N'th element from a list.
Labels:
99 problems,
python
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment