def sum_of_multiples(limit, factors):
    return sum(filter(lambda n: n < limit,
                      {f*i for i in range(1, limit) for f in factors}))

def sum_of_multiples(limit, factors):
    return sum({n for f in factors for n in range(f, limit, f)})

Use more optimal method of getting multiples
Use more optimal method of getting multiples
