      "        return None\n",
      "    return string[::-1]\n",
      "\n",
      "\n",
      "def reverse_string_alt2(string):\n",
      "    if string is None:\n",
      "        return None\n",
      "    return ''.join(reversed(string))"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
 
</s> remove     "def reverse_string_alt(string):\n",
    "    if string is None:\n",
    "        return None\n",
    "    return string[::-1]\n",
 </s> add     "class ReverseStringAlt(object):\n", </s> remove     "def reverse_string(chars):\n",
    "    if chars is None:\n",
    "        return None\n",
    "    size = len(chars)\n",
    "    for i in range(size//2):\n",
    "        chars[i], chars[size-1-i] = \\\n",
    "            chars[size-1-i], chars[i]\n",
    "    return chars"
 </s> add     "class ReverseString(object):\n",
    "\n",
    "    def reverse(self, chars):\n",
    "        if chars is None:\n",
    "            return None\n",
    "        size = len(chars)\n",
    "        for i in range(size//2):\n",
    "            chars[i], chars[size-1-i] = \\\n",
    "                chars[size-1-i], chars[i]\n",
    "        return chars" </s> remove     "def reverse_string(list_chars):\n",
    "    # TODO: Implement me\n",
    "    pass"
 </s> add     "class ReverseString(object):\n",
    "\n",
    "    def reverse(self, chars):\n",
    "        # TODO: Implement me\n",
    "        pass" </s> remove     "    test.test_reverse()\n",
    "    test.test_reverse_inplace()\n",
 </s> add     "    reverse_string = ReverseString()\n",
    "    test.test_reverse(reverse_string.reverse)\n",
    "    test.test_reverse_inplace(reverse_string.reverse)\n",
    "    def reverse_string_alt2(string):\n",
    "        if string is None:\n",
    "            return None\n",
    "        return ''.join(reversed(string))"
      "        return None\n",
      "    return string[::-1]\n",
      "\n",
      "\n",
    "    def reverse_string_alt2(string):\n",
    "        if string is None:\n",
    "            return None\n",
    "        return ''.join(reversed(string))"
    "    def reverse_string_alt2(string):\n",
    "        if string is None:\n",
    "            return None\n",
    "        return ''.join(reversed(string))"
    "    def reverse_string_alt2(string):\n",
    "        if string is None:\n",
    "            return None\n",
    "        return ''.join(reversed(string))"
    "    def reverse_string_alt2(string):\n",
    "        if string is None:\n",
    "            return None\n",
    "        return ''.join(reversed(string))"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Move string reverse to a class 
arrays_strings/reverse_string/reverse_string_solution.ipynb