comefrom: <garvit244>1041_1.py
code: def isRobotBounded( instructions):
      start_x, start_y = 0, 0
      left, direct = 0, 0
      moves = [[0, 1], [-1, 0], [0, -1], [1, 0]]
      instructions = instructions*4
      for instruction in instructions:
          if instruction == 'G':
              start_x += moves[direct][0]
              start_y += moves[direct][1]
          elif instruction == 'L':
              direct = (direct+1)%4
          elif instruction == 'R':
              direct = (direct+3)%4
              
      if(start_x == 0 and start_y == 0):
          return True
      return False
masked: def sample_funcname ( var_0 ) :
      var_2 , var_3 = 0 , 0
      var_4 , var_5 = 0 , 0
      var_7 = [ [ 0 , 1 ] , [ - 1 , 0 ] , [ 0 , - 1 ] , [ 1 , 0 ] ]
      var_0 = var_0 * 4
      for var_9 in var_0 :
          if var_9 == 'G' :
              var_2 += var_7 [ var_5 ] [ 0 ]
              var_3 += var_7 [ var_5 ] [ 1 ]
          elif var_9 == 'L' :
              var_5 = ( var_5 + 1 ) % 4
          elif var_9 == 'R' :
              var_5 = ( var_5 + 3 ) % 4
      if ( var_2 == 0 and var_3 == 0 ) :
          return True
      return False
  