Question: How to split a list into two lists by even and odd positions in maple?

 I want to split a arbirtray list of elements by position into two new lists containing all the even and odd elements.

Example: With a list like this:

ls:=["a", "b", "c", "d", "e"]

how can I get two lists like this:

["a", "c", "e"], ["b", "d"]

How to do it in Maple ? Thanks! 

Maybe selectremove is useful?

 

 

 

 

 

Please Wait...