18Anagram Check

    Mediumstringssorting

    Two phrases are anagrams when they use exactly the same letters the same number of times, like listen and silent.

    Write is_anagram(a, b) that returns True if they are anagrams. Ignore spaces and upper/lower case.

    Examples

    Example 1
    >>> is_anagram('listen', 'silent')
    True
    Example 2
    >>> is_anagram('hello', 'world')
    False

    Run examples checks the 2 examples above. Submit runs all 7 tests, including hidden edge cases, and marks the challenge solved.

    solution.py
    Loading Python…

    Test results show up here

    Write is_anagram in the editor, then run the examples. Use print() freely: its output is shown for each test.