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_1 : str ) -> bool :
      var_2 , var_3 = len ( var_0 ) , len ( var_1 )
      var_5 = var_4 = 0
      while var_5 < var_2 and var_4 < var_3 :
          if var_0 [ var_5 ] != var_1 [ var_4 ] :
              return False
          var_7 = var_6 = 0
          var_8 = var_0 [ var_5 ]
          while var_5 + 1 < var_2 and var_0 [ var_5 + 1 ] == var_8 :
              var_5 += 1
              var_7 += 1
          while var_4 + 1 < var_3 and var_1 [ var_4 + 1 ] == var_8 :
              var_4 += 1
              var_6 += 1
          if var_7 > var_6 :
              return False
          var_5 , var_4 = var_5 + 1 , var_4 + 1
      return var_5 == var_2 and var_4 == var_3
  