Fix #13, PEP8-ify notebooks.

This commit is contained in:
Donne Martin
2015-07-11 15:34:14 -04:00
parent 27c4a4f97c
commit 374d67ff30
18 changed files with 117 additions and 80 deletions

View File

@@ -34,7 +34,6 @@
"source": [
"## Constraints\n",
"\n",
"* Can you assume the string is ASCII?\n",
" * Yes\n",
" * Note: Unicode strings could require special handling depending on your language\n",
@@ -85,6 +84,7 @@
" # TODO: Implement me\n",
" pass\n",
"\n",
"\n",
"def is_rotation(s1, s2):\n",
" # TODO: Implement me\n",
" # Call is_substring only once\n",
@@ -120,7 +120,7 @@
"\n",
"\n",
"class TestRotation(object):\n",
" \n",
"\n",
" def test_rotation(self):\n",
" assert_equal(is_rotation('o', 'oo'), False)\n",
" assert_equal(is_rotation(None, 'foo'), False)\n",
@@ -129,10 +129,12 @@
" assert_equal(is_rotation('foobarbaz', 'barbazfoo'), True)\n",
" print('Success: test_rotation')\n",
"\n",
"\n",
"def main():\n",
" test = TestRotation()\n",
" test.test_rotation()\n",
"\n",
"\n",
"if __name__ == '__main__':\n",
" main()"
]