[Tutor] Uniques values in a list

Sean 'Shaleh' Perry shalehperry@attbi.com
Sun, 17 Mar 2002 11:16:57 -0800 (PST)


def benchmark(func, iters=100000):
    start = time.time()
    for i in range(iters):
        r = func(list1, list2)
    end = time.time()
    print "%d iterations of %s took: %.3f secs" % (iters, func, end - start)

was used on the python list Friday for similar testing.