John Salerno wrote:

> If I want to create a list of the form [100, 99, 99, 98, 98, 97, 97...]
> (where each item is repeated twice after the first one), how might I do
> that most efficiently?

series = [100]*21
series[1::2] = series[2::2] = range(99, 89, -1)

:-)

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

Reply via email to