kj <no.em...@please.post> wrote: > Is there a sequence-oriented equivalent to the sum built-in? E.g.: > > seq_sum(((1, 2), (5, 6))) --> (1, 2) + (5, 6) --> (1, 2, 5, 6) > > ? > Apart from the suggestions for Google for general list flattening, for this specific example you could just use the 'sum' built-in:
>>> sum(((1, 2), (5, 6)), ()) (1, 2, 5, 6) Just give it an empty tuple as the starting value. -- http://mail.python.org/mailman/listinfo/python-list