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_1 : List [ List [ int ] ] ) -> str :
      var_2 = 0
      for var_3 , var_4 in var_1 :
          if var_3 == 0 :
              var_4 = - var_4
          var_2 += var_4
      var_2 %= len ( var_0 )
      return var_0 [ - var_2 : ] + var_0 [ : - var_2 ]
  