new_contents: """
  The idea is to simulate a queue using two stacks (same as previous posts). I use python list as the underlying data structure for stack and add a "move()" method to simplify code: it moves all 
  elements of the "inStack" to the "outStack" when the "outStack" is empty. Here is the code
  """
  
  class Queue(object):
      def __init__(self):
          """
          initialize your data structure here.
          """
          self.inStack, self.outStack = [], []
  
      def push(self, x):
          """
          :type x: int
          :rtype: nothing
          """
          self.inStack.append(x)
  
      def pop(self):
          """
          :rtype: nothing
          """
          self.move()
          self.outStack.pop()
  
      def peek(self):
          """
          :rtype: int
          """
          self.move()
          return self.outStack[-1]
  
      def empty(self):
          """
          :rtype: bool
          """
          return (not self.inStack) and (not self.outStack) 
          
      def move(self):
          """
          :rtype nothing
          """
          if not self.outStack:
              while self.inStack:
                  self.outStack.append(self.inStack.pop())
  
subject: Create queue_with_2_stacks.py