Alex Martelli wrote:

> > But of course that only does it once, and I don't want to have to copy
> > and paste the append line. Perhaps there's a better way than this.
>
> def makeseries(N):
>   series = [N]
>   append = series.append
>   for tailer in xrange(N-1, -1, -1):
>     append(tailer)
>     append(tailer)

But Now You've Violated The DRY Principle!!!

</F>



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to