Recursively Compare Two Strings Python