Is there a better algorithm?

Lie Lie.1296 at gmail.com
Tue Jan 13 08:58:53 EST 2009


On Jan 3, 4:38 am, mr <mario.rugg... at gmail.com> wrote:
> As has been noted, the best is to fix the input to be regular-3-
> tuples. For the fun of it, here's another variation of a solution:
>
<snip>

Yet another solution:

for i in l:
    k, u, v = i[0], None if len(i) == 2 else i[1], i[-1]




More information about the Python-list mailing list