Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

Interpreting the question as kglr has donedone, and using listA and listB as given in kglr's answeranswer:

Cases[listA, {#, x_} :> Sequence[#, x]] & /@ listB /. {} -> Null

{Null, {10, 0.239651}, {1, 0.00869692}, {9, 0.181763},

{9, 0.181763}, Null, Null, {6, 0.074256}, {3, 0.0413228}, Null}

Or

Cases[listA, {#, x_} :> Sequence[#, x]] & /@ listB /. {} -> Nothing

{{10, 0.239651}, {1, 0.00869692}, {9, 0.181763}, {9, 0.181763},

{6, 0.074256}, {3, 0.0413228}}

Interpreting the question as kglr has done, and using listA and listB as given in kglr's answer:

Cases[listA, {#, x_} :> Sequence[#, x]] & /@ listB /. {} -> Null

{Null, {10, 0.239651}, {1, 0.00869692}, {9, 0.181763},

{9, 0.181763}, Null, Null, {6, 0.074256}, {3, 0.0413228}, Null}

Or

Cases[listA, {#, x_} :> Sequence[#, x]] & /@ listB /. {} -> Nothing

{{10, 0.239651}, {1, 0.00869692}, {9, 0.181763}, {9, 0.181763},

{6, 0.074256}, {3, 0.0413228}}

Interpreting the question as kglr has done, and using listA and listB as given in kglr's answer:

Cases[listA, {#, x_} :> Sequence[#, x]] & /@ listB /. {} -> Null

{Null, {10, 0.239651}, {1, 0.00869692}, {9, 0.181763},

{9, 0.181763}, Null, Null, {6, 0.074256}, {3, 0.0413228}, Null}

Or

Cases[listA, {#, x_} :> Sequence[#, x]] & /@ listB /. {} -> Nothing

{{10, 0.239651}, {1, 0.00869692}, {9, 0.181763}, {9, 0.181763},

{6, 0.074256}, {3, 0.0413228}}

Source Link
user1066
  • 22.7k
  • 3
  • 36
  • 59

Interpreting the question as kglr has done, and using listA and listB as given in kglr's answer:

Cases[listA, {#, x_} :> Sequence[#, x]] & /@ listB /. {} -> Null

{Null, {10, 0.239651}, {1, 0.00869692}, {9, 0.181763},

{9, 0.181763}, Null, Null, {6, 0.074256}, {3, 0.0413228}, Null}

Or

Cases[listA, {#, x_} :> Sequence[#, x]] & /@ listB /. {} -> Nothing

{{10, 0.239651}, {1, 0.00869692}, {9, 0.181763}, {9, 0.181763},

{6, 0.074256}, {3, 0.0413228}}