mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-03-04 14:48:45 +00:00
Fix #13, PEP8-ify notebooks.
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
|
||||
"* Do you expect the return to be in reverse order too?\n",
|
||||
" * Yes\n",
|
||||
"* What if one of the inputs is None?\n",
|
||||
@@ -98,7 +97,7 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"class MyLinkedList(LinkedList):\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" def add_reverse(self, first_list, second_list):\n",
|
||||
" # TODO: Implement me\n",
|
||||
" pass"
|
||||
@@ -133,7 +132,7 @@
|
||||
"\n",
|
||||
"\n",
|
||||
"class TestAddReverse(object):\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" def test_add_reverse(self):\n",
|
||||
" print('Test: Empty list(s)')\n",
|
||||
" assert_equal(MyLinkedList().add_reverse(None, None), None)\n",
|
||||
@@ -166,13 +165,15 @@
|
||||
" second_list.append(7)\n",
|
||||
" result = MyLinkedList().add_reverse(first_list, second_list)\n",
|
||||
" assert_equal(result.get_all_data(), [5, 4, 2, 1])\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" print('Success: test_add_reverse')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main():\n",
|
||||
" test = TestAddReverse()\n",
|
||||
" test.test_add_reverse()\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"if __name__ == '__main__':\n",
|
||||
" main()"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user