Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'To exclude sub list' topicStudent Support Forum > General > Archives > "To exclude sub list"

Next Comment >Help | Reply To Topic
Author Comment/Response
Sinval Santos
10/24/01 08:19am

In a list {{a,b},{b,a} }, como to exclude the term {b,a}?

In[109]:= lis={{1,2},{2,1},{2,6},{3,5},{5,3},{6,2}}
Out[109]= {{1,2},{2,1},{2,6},{3,5},{5,3},{6,2}}

In[110]:=ReplaceList[lis,{{a_,b_},{b_,a_}}->{a,b}]
Out[110]= {}

I want to show like this:
{{1,2},{2,6},{3,5}}


URL: ,

Subject (listing for 'To exclude sub list')
Author Date Posted
To exclude sub list Sinval Santos 10/24/01 08:19am
Re: To exclude sub list Henry Lamb 10/27/01 1:44pm
Next Comment >Help | Reply To Topic