Sorting list of lists by the first element of each sub-list

How to sort a list of lists according to the first element of each list?

For example, giving this unsorted list:

[[1,4,7],[3,6,9],[2,59,8]]

The sorted result should be:

[[1,4,7],[2,59,8],[3,6,9]]

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)