Example: I have two 2D lists (each list has no duplicate elements):

l1 = {{1, 1}, {2, 2}, {3, 3}, {4, 4}};
l2 = {{1, 1}, {3, 3}, {5, 5}};

How can I create a new list which consists of elements that are same in both lists?

The result should be:

l={{1, 1}, {3, 3}};

closed as off-topic by Jason B., J. M. will be back soon Mar 29 '16 at 11:02

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Jason B., J. M. will be back soon
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ Intersection[l1,l2]? $\endgroup$ – kglr Mar 29 '16 at 10:37

Browse other questions tagged or ask your own question.