On Sun, 16 Aug 2009 06:59:52 -0400, Chris Rebert wrote:

>> Surely that's going to be O(N**2)?
> 
> The OP asked for "simple", not "best", "most proper", or "fastest". My
> comment was intended to mean that the code was marginally *simpler*, not
> faster.

Fair enough, but he also asked for Pythonic, and while some people might 
argue that "terrible performance" is Pythonic, I hope you wouldn't be one 
of them! :)

If it soothes your ruffled sense of honour *wink*, I think your solution 
with itertools.chain is probably the best so far.


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to