Question: Select from a lists of lists

Hi everybody and thank you all in advance.

This is my question. Suppose I have a list of lists like this:

[[1,2,3],[7,8,9],[13,12,11]]

I want to select all 3rd element from the list of lists and get:

[3,9,11]

Another example:

[1, [2, 3], [4, [5, 6], 7], [8, 3], 9] and select the first element from the list of lists and get:

[1, 2, 4, 8, 9]

Additionally suppose I want to sort a list of lists but base on the 3rd element of every sublist. Example:

From this list:

[[1,2,3],[7,8,2],[13,12,1]] sorted by the  3rd element I would get:

[[13,12,1], [7,8,2], [1,2,3]]

 

Please Wait...