Tag Info

New answers tagged

3

You could also use Thread: table = Thread[arr[[All, ;; 2]] -> arr[[All, -1]]] {{0, 0} -> 0, {0, 1} -> 1, {1, 0} -> 1, {1, 1} -> 1}


7

You can simply do: {#, #2} -> #3 & @@@ {{0, 0, 0}, {0, 1, 1}, {1, 0, 1}, {1, 1, 1}} {{0, 0} -> 0, {0, 1} -> 1, {1, 0} -> 1, {1, 1} -> 1}


6

Use Map: table = (Most[#] -> Last[#])& /@ arr



Top 50 recent answers are included