>>> lst = [0,1,2,3,4,5,6,7,8,9]
>>> index = 0
>>> L = []
>>> while index != len(lst):
... L.append([lst[index], lst[index + 1]])
... index +=2
>>> L
[[0, 1], [2, 3], [4, 5], [6, 7], [8, 9]]
>>> l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> l2 = []
>>> for i in range(0, len(l), 2):
... l2.append([l[i], l[i+1]])
...
>>> print l2
[[0, 1], [2, 3], [4, 5], [6, 7], [8, 9]]
map(None, ls[::2], ls[1::2])
zip(ls[::2], ls[1::2])