Re: Breaking Python list into set-length list of lists

2009-02-12 Thread MRAB
Mensanator wrote: On Feb 11, 10:58�pm, Jason wrote: Hey everyone-- I'm pretty new to Python, & I need to do something that's incredibly simple, but combing my Python Cookbook & googling hasn't helped me out too much yet, and my brain is very, very tired & flaccid @ the moment I have a lis

Re: Breaking Python list into set-length list of lists

2009-02-12 Thread John Machin
On Feb 12, 6:46 pm, Gerard Flanagan wrote: > Jason wrote: > > Hey everyone-- > > > I'm pretty new to Python, & I need to do something that's incredibly > > simple, but combing my Python Cookbook & googling hasn't helped me out > > too much yet, and my brain is very, very tired & flaccid @ the > >

Re: Breaking Python list into set-length list of lists

2009-02-11 Thread Gerard Flanagan
Jason wrote: Hey everyone-- I'm pretty new to Python, & I need to do something that's incredibly simple, but combing my Python Cookbook & googling hasn't helped me out too much yet, and my brain is very, very tired & flaccid @ the moment I have a list of objects, simply called "list". I ne

Re: Breaking Python list into set-length list of lists

2009-02-11 Thread Mark Tolonen
"Jason" wrote in message news:8158439d-faae-4889-a1cf-8d9fee112...@v39g2000yqm.googlegroups.com... Hey everyone-- I'm pretty new to Python, & I need to do something that's incredibly simple, but combing my Python Cookbook & googling hasn't helped me out too much yet, and my brain is very, ver

Re: Breaking Python list into set-length list of lists

2009-02-11 Thread Steven D'Aprano
On Wed, 11 Feb 2009 20:58:28 -0800, Jason wrote: > I have a list of objects, simply called "list". Generally speaking, that's not a good choice of names, because it over- writes ("shadows") the built-in function list(). > I need to break it into > an array (list of lists) wherein each sublist

Re: Breaking Python list into set-length list of lists

2009-02-11 Thread Terry Reedy
Jason wrote: I have a list of objects, simply called "list". Bad idea. I need to break it into an array (list of lists) wherein each sublist is the length of the variable "items_per_page". So array[0] would go from array[0][0] to array[0][items_per_page], then bump up to array[1][0] - arra

Re: Breaking Python list into set-length list of lists

2009-02-11 Thread Mensanator
On Feb 11, 10:58�pm, Jason wrote: > Hey everyone-- > > I'm pretty new to Python, & I need to do something that's incredibly > simple, but combing my Python Cookbook & googling hasn't helped me out > too much yet, and my brain is very, very tired & flaccid @ the > moment > > I have a list of ob

Breaking Python list into set-length list of lists

2009-02-11 Thread Jason
Hey everyone-- I'm pretty new to Python, & I need to do something that's incredibly simple, but combing my Python Cookbook & googling hasn't helped me out too much yet, and my brain is very, very tired & flaccid @ the moment I have a list of objects, simply called "list". I need to break it