input: 
  def num_common_chars(str1: str, str2: str) -> int:
      """Given two strings, find the total number of common characters present in both strings.
      
      >>> num_common_chars("hello", "world")
      3
      >>> num_common_chars("abc", "def")
      0
      >>> num_common_chars("aaaa", "aaab")
      3
      """
      common = 0
      for c in str1:
          if c in str2:
              common += 1
      return common
  
output:     common = 0
      seen = set()
      for c in str1:
          if c in str2 and c not in seen:
              common += 1
              seen.add(c)
      return common