#!/usr/local/bin/python2 from itertools import chain chain_from_iterable = chain.from_iterable l = [[1,2,3,4,5],[6,7,8,9,0],[1,2,3,4,5],[6,7,8,9,0],[1,2,3,4,5]] for i in xrange(100000): b = list(chain_from_iterable([j for j in l])) b.sort() print b