You are viewing a single comment's thread. Return to all comments →
Very easy to understand but you might want to use some python features, i.e., list comprehension
def solve(a0, a1, a2, b0, b1, b2): A = [a0, a1, a2] B = [b0, b1, b2] C = sum([1 if x[0] > x[1] else 0 for x in zip(A,B)]) D = sum([1 if x[1] > x[0] else 0 for x in zip(A,B)]) return (C, D)
Seems like cookies are disabled on this browser, please enable them to open this website
Compare the Triplets
You are viewing a single comment's thread. Return to all comments →
Very easy to understand but you might want to use some python features, i.e., list comprehension