Anagram Checker
Easy
18
89.4% Acceptance
In this lab, you'll implement a Python function named is_anagram
. This function will determine whether two provided strings are anagrams of each other.
Function Requirements:
- Name:
is_anagram
- Parameters: Two strings,
str1
andstr2
. - Output: The function should return a boolean value -
True
ifstr1
andstr2
are anagrams, andFalse
otherwise. - Case Insensitivity: The function should treat uppercase and lowercase letters as the same.
- Non-Letter Characters: Non-letter characters (like spaces or punctuation) should not affect the outcome.
Examples:
is_anagram("Listen", "Silent")
should returnTrue
.is_anagram("Hello", "World")
should returnFalse
.
Implement the is_anagram
function considering these requirements. The lab challenges will test your function across different scenarios to ensure its correctness and efficiency.