input: Write a python function to detect whether an input is an anagram of a given string.
  assert is_anagram('cat', 'tac') == True
  assert is_anagram('listen', 'silent') == True
  assert is_anagram('hello', 'billion') == False
  assert is_anagram('rail safety', 'fairy tales') == True
  assert is_anagram('dormitory', 'dirty room') == True
output: def is_anagram(str1, str2):
      str1 = str1.replace(' ', '').lower()
      str2 = str2.replace(' ', '').lower()
      return sorted(str1) == sorted(str2)