On May 3, 8:03 am, Tobiah <[EMAIL PROTECTED]> wrote: > >>> elegant_solution([1,2,3,4,5,6,7,8,9,10]) > [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]] >
What is your definition of "elegant"? What about other dimensions of
code quality like "robust" and "fast"?
What have you tried?
Here's one possibility:
zip(source[::2], source[1::2])
[I'm presuming you won't be upset by getting tuples instead of lists]
--
http://mail.python.org/mailman/listinfo/python-list
