list =[('1', '5'), ('3', '5'), ('4', '5'), ('5', '1'), ('5', '3'), ('5', '4')]
above is a generated list now i want to write only (5,1) for (1,5) and (5,1) too same with the other values.
Desired output
list = [('5', '1'), ('5', '3'), ('5', '4')]
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Add the item to the new list if its reverse is not also in the list, or the item is larger than its reverse.