If I have a list of tuples, where each tuple represents variables a, band chow can I remove redundant tuples?
Redundant tuples are those where athey are bsimply interchangeable, but c- the same thing. So for this example:
tups = [(30, 40, 50), (40, 30, 50), (20, 48, 52), (48, 20, 52)]
my final list should only contain half the entries. One possible way out:
tups = [(30, 40, 50), (20, 48, 52)]
other
tups = [(40, 30, 50), (20, 48, 52)]
and etc.
Is there an easy Pythonic way to do this?
, (30, 40, 50) (40, 30, 50), , (, , " d ). 2 , .
, (, ), , , .
PS: PE # 39. PE, , ( ).
Edit
, PE # 39 - a, b c, , , a**2 + b**2 == c**2, a b .