A discussion on python-dev ( http://mail.python.org/pipermail/python-dev/2002-November/030380.html ) came up with the idea of allowing arbitrary assignments::
I didn't like the idea of adding this to the language for assignments, so I came up with a generator that basically does the above but assigns the last variable the used iterator, and all without any new syntax.
Thanks to Alex Martelli for simplifying the code and Oren Tirosh for coming up with better variable names.
Python, 9 lines
So now you can do the same as the example mentioned previously as::
This of course works for as many arguments as you want; just make sure you set arg_cnt properly and that the iterable can be called that many times.