input: def filter_by_consonants(s, n):
      """Given a string s and a natural number n, implement a function that returns 
      a list of all words from string s that contain exactly n consonants, maintaining 
      their order of appearance in the string s.
      If the string s is empty, return an empty list.
      Note: Assume the input string contains only letters and spaces.
      Examples:
      filter_by_consonants("Mary had a little lamb", 4) ==> ["little"]
      filter_by_consonants("Mary had a little lamb", 3) ==> ["Mary", "lamb"]
      filter_by_consonants("simple white space", 2) ==> []
      filter_by_consonants("Hello world", 4) ==> ["world"]
      filter_by_consonants("Uncle sam", 3) ==> ["Uncle"]
      """
output:     
      vowels = "aeiouAEIOU"
      words = s.split()
      result = []
  
      for word in words:
          consonant_count = sum(1 for char in word if char.isalpha() and char not in vowels)
          if consonant_count == n:
              result.append(word)
  
      return result
  