4.2 how to extract elements from a list based on some selection?

use select. For example

>restart; 
>my_list:=[1,3.4,3+I,5]; 
>select(x->evalb(Im(x)=0),my_list); 
        [1, 3.4, 5]