Partial list comprehensions

2009-12-04 Thread Joel Davis
Is it possible to run a list comprehension over a certain portion of the list? My goals is to be able to run the comprehension on the innermost elements of the list, but leaving the outermost intact. -- http://mail.python.org/mailman/listinfo/python-list

Re: Partial list comprehensions

2009-12-04 Thread Stephen Hansen
Is it possible to run a list comprehension over a certain portion of the list? My goals is to be able to run the comprehension on the innermost elements of the list, but leaving the outermost intact. Without seeing an example of what your list is, and what you want to turn it into, its sort

Re: Partial list comprehensions

2009-12-04 Thread Mensanator
On Dec 4, 2:22 pm, Joel Davis callmeclaud...@gmail.com wrote: Is it possible to run a list comprehension over a certain portion of the list? My goals is to be able to run the comprehension on the innermost elements of the list, but leaving the outermost intact. Something like this? a [0, 1,

Re: Partial list comprehensions

2009-12-04 Thread Joel Davis
On Dec 4, 3:41 pm, Mensanator mensana...@aol.com wrote: On Dec 4, 2:22 pm, Joel Davis callmeclaud...@gmail.com wrote: Is it possible to run a list comprehension over a certain portion of the list? My goals is to be able to run the comprehension on the innermost elements of the list, but

Re: Partial list comprehensions

2009-12-04 Thread Stephen Hansen
On Fri, Dec 4, 2009 at 2:11 PM, Joel Davis callmeclaud...@gmail.com wrote: Yes, sort of like that but Hansen's code is actually exactly what I was getting at, not sure why he deleted it: Huh? I deleted it? --S -- http://mail.python.org/mailman/listinfo/python-list