On 15/09/06, Daniel Nogradi <[EMAIL PROTECTED]> wrote: > > or maybe a one liner :) > > > > >>> (a + 5*(None,))[:5] > > (1, 2, 3, None, None) > > > > Well, something like this is what I actually do. But for this first I > have to loop over all tuples and pick out the maximal length, so over > all it won't be a one liner but two loops.
I meant it as a one line answer to your padding query, you would still need to iterate over you collection of tuples as it only acts on 1 tuple at a time. That said, its not too difficult to get the whole process, including finding the maximal length to a 2 liner once you have collected your tuples :) -- http://mail.python.org/mailman/listinfo/python-list