input: Write a function to count the characters in a given string and return a dictionary where the keys are the characters and the values are their respective counts. The string will contain alphanumeric characters and spaces. If the input string is empty, return an empty dictionary.
  
  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("abbccc")=={'a': 1, 'b': 2, 'c': 3}
  assert count_chars("")=={}
  assert count_chars("12345")=={'1': 1, '2': 1, '3': 1, '4': 1, '5': 1}
  assert count_chars("AaBbCc")=={'A': 1, 'a': 1, 'B': 1, 'b': 1, 'C': 1, 'c': 1}
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