Skip to main content
deleted 4 characters in body
Source Link
RGL
  • 321
  • 1
  • 3
  • 4

Can also use Pick

 Pick[Alphabet[], Range[26], _?(EvenQ)]EvenQ]

Or for the more general case with spaces removed:

 lst = "element of sel matches patt";
 clst=DeleteCases[Characters[lst]," "];

 Pick[clst,Range[Length[clst]],_?(EvenQ)]EvenQ]

 {"l", "m", "n", "o", "s", "l", "a", "c", "e", "p", "t"}
 

Can also use Pick

 Pick[Alphabet[], Range[26], _?(EvenQ)]

Or for the more general case with spaces removed:

 lst = "element of sel matches patt";
 clst=DeleteCases[Characters[lst]," "];

 Pick[clst,Range[Length[clst]],_?(EvenQ)]

 {"l", "m", "n", "o", "s", "l", "a", "c", "e", "p", "t"}
 

Can also use Pick

 Pick[Alphabet[], Range[26], _?EvenQ]

Or for the more general case with spaces removed:

 lst = "element of sel matches patt";
 clst=DeleteCases[Characters[lst]," "];

 Pick[clst,Range[Length[clst]],_?EvenQ]

 {"l", "m", "n", "o", "s", "l", "a", "c", "e", "p", "t"}
 
Source Link
RGL
  • 321
  • 1
  • 3
  • 4

Can also use Pick

 Pick[Alphabet[], Range[26], _?(EvenQ)]

Or for the more general case with spaces removed:

 lst = "element of sel matches patt";
 clst=DeleteCases[Characters[lst]," "];

 Pick[clst,Range[Length[clst]],_?(EvenQ)]

 {"l", "m", "n", "o", "s", "l", "a", "c", "e", "p", "t"}