 <p>Perhapse this is what you're looking for:</p> <pre><code>a = [[4, 3, 2, 1], [5, 6, 7, 8], [12, 11, 10, 9]] [sorted(list) for list in a] </code></pre> <p>Returns: <code>[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]</code></p> <p>Or, if you additionally want to sort by the first element:</p> <pre><code>a = [[4, 3, 2, 1], [12, 11, 10, 9], [5, 6, 7, 8]] sorted([sorted(list) for list in a], key=min) </code></pre> <p>Also returns: <code>[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]</code></p>