3
$\begingroup$

I would like to remove the element of A1 from the list B1:

How I can do that?

Thank you!

A1= {{5, 6}, {4, 5}, {5, 4}}

   B1 = {{9, 6}, {5, 6}, {6, 0}, {0, 5}, {10, 8}, {1, 2}, {10, 4}, {1, 1}, {7,
    7}, {6, 8}, {5, 3}, {6, 10}, {7, 4}, {1, 8}, {10, 0}, {10, 7}, {6,
    3}, {4, 0}, {9, 2}, {4, 7}, {1, 6}, {10, 8}, {7, 8}, {0, 10}, {3, 
   4}, {0, 0}, {8, 5}, {4, 5}, {6, 0}, {2, 9}, {2, 4}, {8, 4}, {7, 
   4}, {3, 6}, {7, 10}, {1, 10}, {1, 4}, {8, 0}, {8, 9}, {5, 4}, {2, 
   5}, {2, 9}, {3, 1}, {0, 6}, {10, 3}, {9, 6}, {8, 7}, {7, 6}, {7, 
   3}, {8, 9}};```  



$\endgroup$
2
$\begingroup$

Use DeleteCases with the pattern Alternatives @@ A1:

DeleteCases[Alternatives @@ A1]@ B1
{{9, 6}, {6, 0}, {0, 5}, {10, 8}, {1, 2}, {10, 4}, {1, 1}, {7, 7}, {6,   8}, {5, 3},
 {6, 10}, {7, 4}, {1, 8}, {10, 0}, {10, 7}, {6, 3}, {4, 0}, {9, 2},
 {4, 7}, {1, 6}, {10, 8}, {7, 8}, {0, 10}, {3, 4}, {0, 0}, {8, 5},
 {6, 0}, {2, 9}, {2, 4}, {8, 4}, {7, 4}, {3, 6}, {7, 10}, {1, 10}, 
 {1, 4}, {8, 0}, {8, 9}, {2, 5}, {2, 9}, {3, 1}, {0,  6}, {10, 3}, 
 {9, 6}, {8, 7}, {7, 6}, {7, 3}, {8, 9}}
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.