Question: List manipulations

Dear Maple users

I am looking for easy ways to manipulate lists. Especially I want to take a list of lists, say:

[[1,3], [5,8], [9,2], [5,12]]

and create a list of the second components:

[3,8,2,12]

Another problem: How do I collect every second element of a list, say:

[4,2,-1,9,5,6,2,0,14,7]

creating [2,9,6,0,7].

I can do it with loops, but I guess there is a smarter way to accomplish these tasks. I was looking in the ListTools package, but couldn't find anything that could apply there. I hope someone can help. 

 

Regards,

Erik

Please Wait...