Compare the Triplets

  • + 0 comments
    def compareTriplets(a, b):
        # Write your code here
        r = [0,0]
        for xa,yb in zip(a, b):
            if xa > yb:
                r[0] += 1
            if yb > xa:
                r[1] += 1
        return r