(num=1000000, reverse=False, init='', **statements)
The num is the number of times that each statement will 
    be executed. The init statement is executed only once for 
    statement and is not part of the timing result. The 
    statements kwarg is a dict of statements to time, where key
    is a 'name' for the statement, and value is the statement
    (as a string). Prints the timings from smallest to largest
    (unless reverse=True, then opposite).
The num is the number of times that each statement will 
    be executed. The init statement is executed only once for 
    statement and is not part of the timing result. The 
    statements kwarg is a dict of statements to time, where key
    is a 'name' for the statement, and value is the statement
    (as a string). Prints the timings from smallest to largest
    (unless reverse=True, then opposite).
The num is the number of times that each statement will be executed . The init statement is executed only once for statement and is not part of the timing result . The statements kwarg is a dict of statements to time where key is a name for the statement and value is the statement ( as a string ) . Prints the timings from smallest to largest ( unless reverse = True then opposite ) .
def times(num=1000000, reverse=False, init='', **statements):
    '''The num is the number of times that each statement will 
    be executed. The init statement is executed only once for 
    statement and is not part of the timing result. The 
    statements kwarg is a dict of statements to time, where key
    is a 'name' for the statement, and value is the statement
    (as a string). Prints the timings from smallest to largest
    (unless reverse=True, then opposite). '''
    # time each statement
    timings = []
    for n, s in statements.iteritems():
        t = Timing(n, num, init, s)
        t.timeit()
        timings.append(t)
    
    # print(results)
    timings.sort(key=Timing.getResult, reverse=reverse)
    for t in timings:
        print("  %10s => %.3f s" % (t.name, t.getResult()))
def times ( num = 1000000 , reverse = False , init = '' , * * statements ) : # time each statement timings = [ ] for n , s in statements . iteritems ( ) : t = Timing ( n , num , init , s ) t . timeit ( ) timings . append ( t ) # print(results) timings . sort ( key = Timing . getResult , reverse = reverse ) for t in timings : print ( "  %10s => %.3f s" % ( t . name , t . getResult ( ) ) )