Nov-05-2020, 05:01 PM
That's awesome, thank you !
The good answer, for my need, was this one :
The good answer, for my need, was this one :
def find_matches(tuples): result = [False] # <- Was incorrectly set to True for i in range(len(tuples)-1): pair = list(set(tuples[i])) + list(set(tuples[i+1])) // Protect against duplicates in a list result.append(len(set(pair)) != len(pair)) # And corresponding error here. return result print(find_matches([(45,50,30,21), (30,9,56,3), (57,10,21,4), (41,30,50,56)]))Thank you again.