      "        while source.peek() is not None:\n",
      "            destination.push(source.pop())\n",
      "\n",
      "    def enqueue(self, data):\n",
      "        if self.is_stack_empty(self.left_stack) and not self.is_stack_empty(self.right_stack):\n",
      "            self.shift_stacks(self.right_stack, self.left_stack)\n",
      "        self.left_stack.push(data)\n",
      "\n",
      "    def dequeue(self):\n",
      "        if self.is_stack_empty(self.right_stack) and not self.is_stack_empty(self.left_stack):\n",
 
</s> remove     "        if self.is_stack_empty(self.right_stack) and not self.is_stack_empty(self.left_stack):\n",
 </s> add     "        if self.right_stack.is_empty() and not self.left_stack.is_empty():\n", </s> remove     "    def is_stack_empty(self, stack):\n",
    "        return stack.peek() is None\n",
    "\n",
 </s> add  </s> remove   },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
 </s> add  </s> remove    "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Dequeue on empty stack\n",
      "None\n",
      "Enqueue on empty stack\n",
      "Enqueue on non-empty stack\n",
      "Multiple enqueue in a row\n",
      "Dequeue on non-empty stack\n",
      "Dequeue after an enqueue\n",
      "0\n",
      "Multiple dequeue in a row\n",
      "1\n",
      "2\n",
      "Enqueue after a dequeue\n",
      "5\n",
      "None\n"
     ]
    }
   ],
 </s> add    "outputs": [], </s> remove    "execution_count": 14,
 </s> add    "execution_count": null,
    "        if self.left_stack.is_empty() and not self.right_stack.is_empty():\n",
      "        while source.peek() is not None:\n",
      "            destination.push(source.pop())\n",
      "\n",
      "    def enqueue(self, data):\n",
    "        if self.left_stack.is_empty() and not self.right_stack.is_empty():\n",
      "            self.shift_stacks(self.right_stack, self.left_stack)\n",
      "        self.left_stack.push(data)\n",
      "\n",
      "    def dequeue(self):\n",
      "        if self.is_stack_empty(self.right_stack) and not self.is_stack_empty(self.left_stack):\n",
keep keep keep keep replace keep keep keep keep keep
 Updated problem solution to use stack's is_empty() method rather than a similar method that used to be in QueueFromStacks. 
stacks-queues/queue-from-stacks.ipynb