      "        data = self.last_stack.pop()\n",
      "        if self.last_stack.num_items == 0:\n",
      "            self.stacks.pop()\n",
      "            num_stacks = len(self.stacks)\n",
      "        return data"
     ]
    },
 
</s> remove     "            if num_stacks == 0:\n",
    "                self.last_stack = None\n",
    "            else:\n",
    "                self.last_stack = self.stacks[num_stacks-1]\n",
    "        else:\n",
    "            data = self.last_stack.pop()\n",
 </s> add  </s> remove     "            return\n",
    "        elif self.last_stack.top.next is None:\n",
    "            data = self.last_stack.pop()\n",
 </s> add     "            return None\n",
    "        data = self.last_stack.pop()\n",
    "        if self.last_stack.num_items == 0:\n", </s> remove     "        return data\n",
 </s> add     "        return super(StackWithCapacity, self).pop()\n", </s> remove     "        data = super(StackWithCapacity, self).pop()\n",
 </s> add  </s> remove     "        if self.num_items < self.capacity:\n",
    "            super(StackWithCapacity, self).push(data)\n",
    "            self.num_items += 1\n",
    "        else:\n",
 </s> add     "        if self.is_full():\n",
    "            self.last_stack = self.stacks[len(self.stacks)-1] \\\n",
    "                if len(self.stacks) else None\n",
      "        data = self.last_stack.pop()\n",
      "        if self.last_stack.num_items == 0:\n",
      "            self.stacks.pop()\n",
    "            self.last_stack = self.stacks[len(self.stacks)-1] \\\n",
    "                if len(self.stacks) else None\n",
      "            num_stacks = len(self.stacks)\n",
      "        return data"
     ]
    },
keep keep add keep keep keep keep
 Polish set of stacks solution 
stacks_queues/set_of_stacks/set_of_stacks_solution.ipynb