Hello there i've written a small functions that takes two lists and compares them for duplicating pairs, and returns a boolean value.
For instance ([1,2,3],[2,1,4]) returns false and ([1,2,3],[3,4,5]) returns true But i would like the argument to take any given amount of lists, instead of just two.
Here's my program so far:
def check(xrr, yrr):
x = xrr[:]
x.sort()
y = yrr[:]
y.sort()
for i in range(len(x)-1):
if x[i]==y[i]:
return False
return True
But also it isnt exactly working correctly yet, as ([1,2,3],[1,4,5]) also returns false.
Any hints and ideas is highly appreciated
([1,2,3],[1,4,5])to returnFalse? The first element in both after sorting is1, sox[0]==y[0], and it should return false. The question is, what do you mean by duplicating pairs?