newPathList = []
pathList = sorted(pathList, reverse=True)
oldx = 0
for i in pathList:
    x, y = i
if x != oldx:
    newPathList.append(i)
oldx = x
print(newPathList)
Remove repeating tuples from a list, depending on the values in the tuples