Skip to content

Commit

Permalink
Merge pull request #2 from 1millionwomentotech/master
Browse files Browse the repository at this point in the history
Merging updates
  • Loading branch information
anushalihala authored Jun 28, 2018
2 parents a3896a5 + c8fb9d5 commit e6be87b
Showing 1 changed file with 45 additions and 2 deletions.
47 changes: 45 additions & 2 deletions toy-problems/toy-problem-003.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 3,
"metadata": {
"collapsed": false
},
Expand All @@ -296,7 +296,7 @@
"\"i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so long. using string.maketrans() is recommended. now apply on the url.\""
]
},
"execution_count": 17,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -369,6 +369,49 @@
"\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"\"i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so long. using string.maketrans() is recommended. now apply on the url.\""
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# solution with a built-in function str.maketrans()\n",
"\n",
"table = str.maketrans(\"abcdefghijklmnopqrstuvwxyz\", \"cdefghijklmnopqrstuvwxyzab\")\n",
"raw.translate(table)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit e6be87b

Please sign in to comment.