input: Write a python function to check if two strings are anagrams.
  assert check_anagrams("Listen", "Silent") == True
  assert check_anagrams("Hello", "World") == False
  assert check_anagrams("Dormitory", "Dirty room") == True
  assert check_anagrams("School master", "The classroom") == True
  assert check_anagrams("Astronomer", "Moon starer") == True
output: def check_anagrams(str1, str2):
      # Remove spaces and convert to lowercase
      str1 = ''.join(str1.lower().split())
      str2 = ''.join(str2.lower().split())
      
      # Sort the characters and compare
      return sorted(str1) == sorted(str2)