Use a complex algorithm to compare strings in python!