[Zope] List within a list - how to use in a page template

Chris Withers chris at simplistix.co.uk
Thu Dec 15 10:00:17 EST 2005


David H wrote:
> # python script
> # input:  a tuple named tup of index items to include in list of lists, 
> eg (1,3) and the list of lists
> #example input:  listoflists = [[61282125371L, 1, 6, 0], [61282125379L, 
> 1, 6, 0], [61282825240L, 6, 6, 0]]
> #example tup: (1,3)
> 
> ret = []
> for i in range(len(listoflists)):
>  if i in tup:
>    ret.append(x[i])
> return ret
> 

Hmmm, I'd hypothesise that whatever is returning that list of lists is 
what needs to change :-S

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope mailing list