comefrom: <doocs>1427.Perform String Shifts_1.py
code: def stringShift( s: str, shift: List[List[int]]) -> str:
      x = 0
      for a, b in shift:
          if a == 0:
              b = -b
          x += b
      x %= len(s)
      return s[-x:] + s[:-x]
masked: def sample_funcname ( var_0 : str , var_2 : List [ List [ int ] ] ) -> str :
      var_6 = 0
      for var_7 , var_8 in var_2 :
          if var_7 == 0 :
              var_8 = - var_8
          var_6 += var_8
      var_6 %= len ( var_0 )
      return var_0 [ - var_6 : ] + var_0 [ : - var_6 ]
  