      "\n",
      "* None -> None\n",
      "* '' -> ''\n",
      "* 'AABBCC' -> 'AABBCC'\n",
      "* 'AAABCCDDDD' -> 'A3B1C2D4'"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
 
</s> remove     "## Problem: Compress a string such that 'AAABCCDDDD' becomes 'A3B1C2D4'.  Only compress the string if it saves space.\n",
 </s> add     "## Problem: Compress a string such that 'AAABCCDDDD' becomes 'A3BC2D4'.  Only compress the string if it saves space.\n", </s> remove     "        assert_equal(func('AAABCCDDDD'), 'A3B1C2D4')\n",
 </s> add     "        assert_equal(func('AAABCCDDDD'), 'A3BC2D4')\n", </s> remove     "            result += prev_char + str(count)\n",
 </s> add     "            result += prev_char + (str(count) if count > 1 else '')\n", </s> remove         assert_equal(func('AAABCCDDDD'), 'A3B1C2D4')
 </s> add         assert_equal(func('AAABCCDDDD'), 'A3BC2D4')
    "* 'AAABCCDDDD' -> 'A3BC2D4'"
      "\n",
      "* None -> None\n",
      "* '' -> ''\n",
      "* 'AABBCC' -> 'AABBCC'\n",
    "* 'AAABCCDDDD' -> 'A3BC2D4'"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
keep keep keep keep replace keep keep keep keep keep
 Update compress solution so AAAAB becomes A4B.

Previously the solution would yield A4B1, which doesn't have as much compression. 
arrays_strings/compress/compress_solution.ipynb