      "            else:\n",
      "                result += prev_char + (str(count) if count > 1 else '')\n",
      "                prev_char = char\n",
      "                count = 1\n",
      "        result += prev_char + (str(count) if count > 1 else '')\n",
      "        return result if len(result) < len(string) else string"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
 
</s> remove     "        if string is None or len(string) == 0:\n",
 </s> add     "        if string is None or not string:\n", </s> remove     "                result += prev_char + (str(count) if count > 1 else '')\n",
 </s> add     "                result += self._calc_partial_result(prev_char, count)\n",
    "        result += self._calc_partial_result(prev_char, count)\n",
    "        return result if len(result) < len(string) else string\n",
    "\n",
    "    def _calc_partial_result(self, prev_char, count):\n",
    "        return prev_char + (str(count) if count > 1 else '')"
      "            else:\n",
      "                result += prev_char + (str(count) if count > 1 else '')\n",
      "                prev_char = char\n",
      "                count = 1\n",
    "        result += self._calc_partial_result(prev_char, count)\n",
    "        return result if len(result) < len(string) else string\n",
    "\n",
    "    def _calc_partial_result(self, prev_char, count):\n",
    "        return prev_char + (str(count) if count > 1 else '')"
    "        result += self._calc_partial_result(prev_char, count)\n",
    "        return result if len(result) < len(string) else string\n",
    "\n",
    "    def _calc_partial_result(self, prev_char, count):\n",
    "        return prev_char + (str(count) if count > 1 else '')"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
keep keep keep keep replace replace keep keep keep keep keep
 Polish compress string (#101)

Fix empty string check, move duplicate code to a method. 
arrays_strings/compress/compress_solution.ipynb