C Gillespie wrote: > Dear All, > > If I have a list, say > > x=[1,2,3,4,5,6] > > What's the best way of converting it into this: [[1, 2], [3, 4], [5, 6]], > i.e. splitting it into pairs. don't know if it's the best way but you can try this: pairs = [x[2*i:2*i+2] for i in xrange(len(x)/2)]