for n in range(1, 101):
    for k in range(1, n + 1):
        if comb(n, k) > 1000000:
            result += 1

def test2():
    result = 0
for n in range(1, 101):
    for k in range(1, n + 1):
        if comb2(n, k) > 1000000:
            result += 1
T = timeit.Timer(test)
print(T.repeat(3, 50))
T2 = timeit.Timer(test2)
print(T2.repeat(3, 50))
calculating the number of k-combinations with and without SciPy