The following code produces three lists. List px contains 20 integers, list bx contains 10 integers and list cx contains 10 integers. I would like to apply the "Take" function to these 3 lists. I am trying to avoid having 100 separate "Take" statements in another worksheet. I keep getting the error below. I would like the output to be in a flatten-able list or a single list. What am I doing wrong!
(*p=Table[p,{p,1,40,2}]
Length[p];
b=Table[b,{b,1,10,1}]
Length[b];
c=Table[c,{c,4,13,1}]
Length[c];*)
p = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33,
35, 37, 39};
b = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
c = {4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
Take[p, {b, c}]
Take::seqs: Sequence specification (+n, -n, {+n}, {-n}, {m, n}, or {m, n, s}) expected at position 2 in Take[{1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39},
{{1,2,3,4,5,6,7,8,9,10},{4,5,6,7,8,9,10,11,12,13}}]. >>
Take[{1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33,
35, 37, 39}, {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {4, 5, 6, 7, 8, 9,
10, 11, 12, 13}}]