import timeit print timeit.timeit('not not x', 'x = 3')print timeit.timeit('bool(x)', 'x = 3')
Standard input is empty
0.0203268527985 0.102602005005
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!