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 single string as an input and return a dictionary where the keys are the characters from the string and the values are the counts of those characters. If the string is empty, the function should return an empty dictionary.
  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("AaBbCc")=={'A': 1, 'a': 1, 'B': 1, 'b': 1, 'C': 1, 'c': 1}
  assert count_chars("Mississippi")=={'M': 1, 'i': 4, 's': 4, 'p': 2}
output: def count_chars(s):
      char_count = {}
      for char in s:
          if char in char_count:
              char_count[char] += 1
          else:
              char_count[char] = 1
      return char_count