revise An anagram detection python