comefrom: <doocs>0925.Long Pressed Name_1.py
code: def isLongPressedName( name: str, typed: str) -> bool:
      m, n = len(name), len(typed)
      i = j = 0
      while i < m and j < n:
          if name[i] != typed[j]:
              return False
          cnt1 = cnt2 = 0
          c = name[i]
          while i + 1 < m and name[i + 1] == c:
              i += 1
              cnt1 += 1
          while j + 1 < n and typed[j + 1] == c:
              j += 1
              cnt2 += 1
          if cnt1 > cnt2:
              return False
          i, j = i + 1, j + 1
      return i == m and j == n
masked: def sample_funcname ( var_0 : str , var_2 : str ) -> bool :
      var_5 , var_6 = len ( var_0 ) , len ( var_2 )
      var_9 = var_7 = 0
      while var_9 < var_5 and var_7 < var_6 :
          if var_0 [ var_9 ] != var_2 [ var_7 ] :
              return False
          var_12 = var_11 = 0
          var_13 = var_0 [ var_9 ]
          while var_9 + 1 < var_5 and var_0 [ var_9 + 1 ] == var_13 :
              var_9 += 1
              var_12 += 1
          while var_7 + 1 < var_6 and var_2 [ var_7 + 1 ] == var_13 :
              var_7 += 1
              var_11 += 1
          if var_12 > var_11 :
              return False
          var_9 , var_7 = var_9 + 1 , var_7 + 1
      return var_9 == var_5 and var_7 == var_6
  