input: Write a function to generate a Python dictionary that contains the count of the characters in a given string. The function should take a string as input and return a dictionary where the keys are the characters from the string and the values are the counts of how many times each character appears.
  
  def count_chars(string):
      count_dict = {}
  
      for char in string:
          if char in count_dict:
              count_dict[char] += 1
          else:
              count_dict[char] = 1
  
      return count_dict
  
  assert count_chars("Hello World")=={'H': 1, 'e': 1, 'l': 3, 'o': 2, ' ': 1, 'W': 1, 'r': 1, 'd': 1}
  assert count_chars("Python")=={'P': 1, 'y': 1, 't': 1, 'h': 1, 'o': 1, 'n': 1}
  assert count_chars("")=={}
  assert count_chars("aaabbbccc")=={'a': 3, 'b': 3, 'c': 3}
  assert count_chars("123123")=={'1': 2, '2': 2, '3': 2}
output: def count_chars(string):
      count_dict = {}
  
      for char in string:
          if char in count_dict:
              count_dict[char] += 1
          else:
              count_dict[char] = 1
  
      return count_dict