Skip to content

Commit b45e1a9

Browse files
committed
upup
1 parent ad70b2d commit b45e1a9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.ipynb_checkpoints/Functions and Methods Homework - Solutions-checkpoint.ipynb

+3-2
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@
165165
"outputs": [],
166166
"source": [
167167
"def unique_list(l):\n",
168+
" # Also possible to use list(set())\n",
168169
" x = []\n",
169170
" for a in l:\n",
170171
" if a not in x:\n",
@@ -262,7 +263,7 @@
262263
"source": [
263264
"def palindrome(s):\n",
264265
" \n",
265-
" s = s.replace(' ','') # This replaces all spaces \" \" with no space ''. (Fixes issues with sentence like strings)\n",
266+
" s = s.replace(' ','') # This replaces all spaces \" \" with no space ''. (Fixes issues with strings that have spaces)\n",
266267
" return s == s[::-1] # Check through slicing"
267268
]
268269
},
@@ -410,7 +411,7 @@
410411
"name": "python",
411412
"nbconvert_exporter": "python",
412413
"pygments_lexer": "ipython2",
413-
"version": "2.7.10"
414+
"version": "2.7.11"
414415
}
415416
},
416417
"nbformat": 4,

Functions and Methods Homework - Solutions.ipynb

+3-2
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@
165165
"outputs": [],
166166
"source": [
167167
"def unique_list(l):\n",
168+
" # Also possible to use list(set())\n",
168169
" x = []\n",
169170
" for a in l:\n",
170171
" if a not in x:\n",
@@ -262,7 +263,7 @@
262263
"source": [
263264
"def palindrome(s):\n",
264265
" \n",
265-
" s = s.replace(' ','') # This replaces all spaces \" \" with no space ''. (Fixes issues with sentence like strings)\n",
266+
" s = s.replace(' ','') # This replaces all spaces \" \" with no space ''. (Fixes issues with strings that have spaces)\n",
266267
" return s == s[::-1] # Check through slicing"
267268
]
268269
},
@@ -410,7 +411,7 @@
410411
"name": "python",
411412
"nbconvert_exporter": "python",
412413
"pygments_lexer": "ipython2",
413-
"version": "2.7.10"
414+
"version": "2.7.11"
414415
}
415416
},
416417
"nbformat": 4,

0 commit comments

Comments
 (0)