Compare the Triplets

  • + 11 comments

    Do you see any improvements in my solution:

    def compareTriplets(a, b):

    alice = 0
    bob = 0
    
    for x in range(len(a)):
        if a[x] > b[x]:
            alice += 1
    
    for x in range(len(b)):
        if b[x] > a[x]:
            bob += 1
    
    result = (alice, bob)
    return result