comefrom: <doocs>1041.Robot Bounded In Circle_1.py
code: def isRobotBounded( instructions: str) -> bool:
      cur, direction = 0, [0] * 4
      for ins in instructions:
          if ins == 'L':
              cur = (cur + 1) % 4
          elif ins == 'R':
              cur = (cur + 3) % 4
          else:
              direction[cur] += 1
      return cur != 0 or (
          direction[0] == direction[2] and direction[1] == direction[3]
      )
masked: def sample_funcname ( var_0 : str ) -> bool :
      var_4 , var_6 = 0 , [ 0 ] * 4
      for var_7 in var_0 :
          if var_7 == 'L' :
              var_4 = ( var_4 + 1 ) % 4
          elif var_7 == 'R' :
              var_4 = ( var_4 + 3 ) % 4
          else :
              var_6 [ var_4 ] += 1
      return var_4 != 0 or ( var_6 [ 0 ] == var_6 [ 2 ] and var_6 [ 1 ] == var_6 [ 3 ] )
  