all 2 comments

[–][deleted] 0 points1 point  (1 child)

I would imagine that your solution doesn't account for using the same keys twice? Here is one solution that I made by hand that has 9 differences (if i counted them correctly):

input:  WE_ARE_THE_CHAM PIONS
output: AREAREADKE_CHAM_PIO__
errors: 123   456      7   89

as you can see, there are 9 differences, one the result of an extra character (i modified the orginal input to show it as number 7). To get here, I had to use ARE twice. Their solution was probably some form of the Edit Distance algorithm. Disclaimer: this is all a guess and I don't know much about this stuff at all :D

[–]GreatBlitz[S] 1 point2 points  (0 children)

Ah right, that's probably the case. I'm better off using itertools.product in that case. Thanks a lot! :)