Today, I was fooling around with a couple of programming puzzles. Faced with the task of testing a string to see whether or not it is a palindrome, I conceived of several ways t
For timing small pieces of code like these functions, timeit can be very useful. Then you can find which one is faster yourself :)