Edward Elliott <[EMAIL PROTECTED]> wrote:
>  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?
> 
>  Why not just this:
> 
>  series = [x/2 for x in range(200, 1, -1)]

That should be

  series = [x//2 for x in range(200, 1, -1)]

to be "from __future__ import division" safe

-- 
Nick Craig-Wood <[EMAIL PROTECTED]> -- http://www.craig-wood.com/nick
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to