Fix #13, PEP8-ify notebooks.

This commit is contained in:
Donne Martin
2015-07-11 15:34:52 -04:00
parent 374d67ff30
commit 04083b2011
25 changed files with 210 additions and 173 deletions

View File

@@ -34,7 +34,6 @@
"source": [
"## Constraints\n",
"\n",
"* Is this a singly or doubly linked list?\n",
" * Singly\n",
"* Can you insert None values in the list?\n",
@@ -94,7 +93,7 @@
"outputs": [],
"source": [
"class MyLinkedList(LinkedList):\n",
" \n",
"\n",
" def remove_dupes(self):\n",
" # TODO: Implement me\n",
" pass"
@@ -129,7 +128,7 @@
"\n",
"\n",
"class TestRemoveDupes(object):\n",
" \n",
"\n",
" def test_remove_dupes(self, linked_list):\n",
" print('Test: Empty list')\n",
" linked_list.remove_dupes()\n",
@@ -151,14 +150,16 @@
" print('Test: General case, no duplicates')\n",
" linked_list.remove_dupes()\n",
" assert_equal(linked_list.get_all_data(), [1, 3, 2])\n",
" \n",
"\n",
" print('Success: test_remove_dupes\\n')\n",
"\n",
"\n",
"def main():\n",
" test = TestRemoveDupes()\n",
" linked_list = MyLinkedList(None)\n",
" test.test_remove_dupes(linked_list)\n",
" \n",
"\n",
"\n",
"if __name__ == '__main__':\n",
" main()"
]