input: def num_common_chars(str1: str, str2: str) -> int:
      """
      Find the total number of common characters present in both strings.
      >>> num_common_chars('abc', 'abc')
      3
      >>> num_common_chars('aabbcc', 'abc')
      3
      >>> num_common_chars('aabcc', 'abc')
      4
      """
output:     set1 = set(str1)
      set2 = set(str2)
      common_chars = set1 & set2
      count = 0
      for char in common_chars:
          count += min(str1.count(char), str2.count(char))
      return count