Fuzzyman:

> for i in l:
>    u = None
>    if len(i) == 2:
>       k, v = i
>    else:
>        k, u, v = i

That's the best solution I have seen in this thread so far (but I
suggest to improve indents and use better variable names). In
programming it's generally better to follow the KISS principle.

Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to