Ad
Code
Diff
  • def anagram_check(words):
        f, s = words.split()
        if sorted(f) == sorted(s):
            if f[0] == s[0] and f[-1] == s[-1]:
                return'Super Anagram'
            return 'Anagram'
        return False
    • def anagram_check(words):
    • listed = words.split(" ")
    • first = listed[0]
    • second = listed[1]
    • first_split = (list(first))
    • second_split = (list(second))
    • if first_split[0]==second_split[0] and first_split[-1]==second_split[-1]:
    • first_split_alpha = sorted(first_split)
    • second_split_alpha = sorted(second_split)
    • if first_split_alpha == second_split_alpha:
    • f, s = words.split()
    • if sorted(f) == sorted(s):
    • if f[0] == s[0] and f[-1] == s[-1]:
    • return'Super Anagram'
    • else:
    • return False
    • else:
    • return 'Anagram'
    • return 'Anagram'
    • return False