      "def is_substring(s1, s2):\n",
      "    return s1 in s2\n",
      "\n",
      "\n",
      "def is_rotation(s1, s2):\n",
      "    if s1 is None or s2 is None:\n",
      "        return False\n",
      "    if len(s1) != len(s2):\n",
      "        return False\n",
      "    return is_substring(s1, s2 + s2)"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
 
</s> remove     "def is_substring(s1, s2):\n",
    "    return s1 in s2\n",
 </s> add     "class Rotation(object):\n", </s> remove     "def is_rotation(s1, s2):\n",
    "    # TODO: Implement me\n",
    "    # Call is_substring only once\n",
    "    pass"
 </s> add     "    def is_rotation(self, s1, s2):\n",
    "        # TODO: Implement me\n",
    "        # Call is_substring only once\n",
    "        pass" </s> remove     "def is_substring(s1, s2):\n",
    "    # TODO: Implement me\n",
    "    pass\n",
 </s> add     "class Rotation(object):\n",
    "    def is_rotation(self, s1, s2):\n",
    "        if s1 is None or s2 is None:\n",
    "            return False\n",
    "        if len(s1) != len(s2):\n",
    "            return False\n",
    "        return self.is_substring(s1, s2 + s2)"
      "def is_substring(s1, s2):\n",
      "    return s1 in s2\n",
      "\n",
      "\n",
    "    def is_rotation(self, s1, s2):\n",
    "        if s1 is None or s2 is None:\n",
    "            return False\n",
    "        if len(s1) != len(s2):\n",
    "            return False\n",
    "        return self.is_substring(s1, s2 + s2)"
    "    def is_rotation(self, s1, s2):\n",
    "        if s1 is None or s2 is None:\n",
    "            return False\n",
    "        if len(s1) != len(s2):\n",
    "            return False\n",
    "        return self.is_substring(s1, s2 + s2)"
    "    def is_rotation(self, s1, s2):\n",
    "        if s1 is None or s2 is None:\n",
    "            return False\n",
    "        if len(s1) != len(s2):\n",
    "            return False\n",
    "        return self.is_substring(s1, s2 + s2)"
    "    def is_rotation(self, s1, s2):\n",
    "        if s1 is None or s2 is None:\n",
    "            return False\n",
    "        if len(s1) != len(s2):\n",
    "            return False\n",
    "        return self.is_substring(s1, s2 + s2)"
    "    def is_rotation(self, s1, s2):\n",
    "        if s1 is None or s2 is None:\n",
    "            return False\n",
    "        if len(s1) != len(s2):\n",
    "            return False\n",
    "        return self.is_substring(s1, s2 + s2)"
    "    def is_rotation(self, s1, s2):\n",
    "        if s1 is None or s2 is None:\n",
    "            return False\n",
    "        if len(s1) != len(s2):\n",
    "            return False\n",
    "        return self.is_substring(s1, s2 + s2)"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
 Move string rotation to a class 
arrays_strings/rotation/rotation_solution.ipynb