input: Write a function to generate a Python dictionary that contains the count of characters in a given string. The function should exclude spaces and be case-insensitive.
  
  def count_chars_no_spaces(string):
      count_dict = {}
      
      for char in string.replace(" ", "").lower():
          if char in count_dict:
              count_dict[char] += 1
          else:
              count_dict[char] = 1
      
      return count_dict
  
  print(count_chars_no_spaces("Hello World"))
  
  # Output: {'h': 1, 'e': 1, 'l': 3, 'o': 2, 'w': 1, 'r': 1, 'd': 1}
  
  assert count_chars_no_spaces("Hello World") == {'h': 1, 'e': 1, 'l': 3, 'o': 2, 'w': 1, 'r': 1, 'd': 1}
  assert count_chars_no_spaces("Python Programming") == {'p': 2, 'y': 1, 't': 1, 'h': 2, 'o': 1, 'n': 1, 'r': 2, 'g': 2, 'a': 1, 'm': 2, 'i': 1}
  assert count_chars_no_spaces("OpenAI ChatGPT") == {'o': 1, 'p': 1, 'e': 1, 'n': 1, 'a': 2, 'i': 1, 'c': 1, 'h': 1, 't': 1, 'g': 1}
  assert count_chars_no_spaces("") == {}
  assert count_chars_no_spaces("A") == {'a': 1}
output: def count_chars_no_spaces(string):
      count_dict = {}
      
      for char in string.replace(" ", "").lower():
          if char in count_dict:
              count_dict[char] += 1
          else:
              count_dict[char] = 1
      
      return count_dict