Reducing Problems - Bug Fixing #8
Oh no! Timmy's reduce is causing problems, Timmy's goal is to calculate the two teams scores and return the winner but timmy has gotten confused and sometimes teams don't enter their scores, total the scores out of 3! Help timmy fix his program!
Return true if team 1 wins or false if team 2 wins!
from functools import reduce

def calculate_total(t1, t2):
    f = lambda t: reduce(lambda a, b: a + b, t, 0)
    return f(t1) > f(t2)
from functools import reduce

def calculate_total(t1, t2):
    f = lambda t: reduce(lambda a, b: a + b, t, 0)
    return f(t1) > f(t2)