comefrom: <doocs>1441.Build an Array With Stack Operations_1.py
code: def buildArray( target: List[int], n: int) -> List[str]:
      cur, ans = 1, []
      for t in target:
          for i in range(cur, n + 1):
              ans.append('Push')
              if t == i:
                  cur = i + 1
                  break
              ans.append('Pop')
      return ans
masked: def sample_funcname ( var_0 : List [ int ] , var_3 : int ) -> List [ str ] :
      var_6 , var_7 = 1 , [ ]
      for var_8 in var_0 :
          for var_10 in range ( var_6 , var_3 + 1 ) :
              var_7.append ( 'Push' )
              if var_8 == var_10 :
                  var_6 = var_10 + 1
                  break
              var_7.append ( 'Pop' )
      return var_7
  