def replicate_elements(lst, n):
for x in lst:
for y in range(n):
yield x
Sunday, November 2, 2008
99 problems - python - 15
Replicate the elements of a list a given number of times.
Labels:
99 problems,
python
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment