Python hamming exercise done.