input: def num_common_chars(str1: str, str2: str) -> int:
      """ Returns the total number of common characters present in both strings.
      >>> num_common_chars("hello", "world")
      3
      >>> num_common_chars("abcd", "efgh")
      0
      >>> num_common_chars("aabbcc", "abcabc")
      6
      """
output:     common_chars = set(str1) & set(str2)
      return sum(min(str1.count(char), str2.count(char)) for char in common_chars)