Re: finding items that occur before or after an item in lists

2006-07-04 Thread Simon Forman
Simon Forman wrote: > I've got a function that I'd like to improve. > > It takes a list of lists and a "target" element, and it returns the set > of the items in the lists that appear either before or after the target > item. (Actually, it's a generator, and I use the set class outside of > it to

finding items that occur before or after an item in lists

2006-07-04 Thread Simon Forman
I've got a function that I'd like to improve. It takes a list of lists and a "target" element, and it returns the set of the items in the lists that appear either before or after the target item. (Actually, it's a generator, and I use the set class outside of it to collect the unique items, but y