mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-06 09:28:02 +00:00
Fix #13, PEP8-ify notebooks.
This commit is contained in:
@@ -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()"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user