comefrom: <doocs>1221.Split a String in Balanced Strings_1.py
code: def balancedStringSplit( s: str) -> int:
      ans = l = 0
      for c in s:
          if c == 'L':
              l += 1
          else:
              l -= 1
          if l == 0:
              ans += 1
      return ans
masked: def sample_funcname ( var_0 : str ) -> int :
      var_5 = var_3 = 0
      for var_6 in var_0 :
          if var_6 == 'L' :
              var_3 += 1
          else :
              var_3 -= 1
          if var_3 == 0 :
              var_5 += 1
      return var_5
  