Write a Python function to check if a given string is an anagram of another given string.
Topic: Write a Python function to check if a given string is an anagram of another given string.
Solution
def is_anagram(str1, str2): list_str1 = list(str1) list_str1.sort() list_str2 = list(str2) list_str2.sort() return (list_str1 == list_str2)
List all Python Programs