Skip to content

Commit 429f8d5

Browse files
committed
Merge pull request #26 from pythonsd/part4-sets
added sets optional
2 parents 4dc6c85 + 437fca4 commit 429f8d5

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

part-4.ipynb

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"name": "",
4-
"signature": "sha256:57da39b42fe7452dcc70302cd9a783c3a0c4c707ecf5977e607f1ed08f3b755f"
4+
"signature": "sha256:40f96dd4a9a68767b80bf16809c2b3aebd08f6893eb2d01994fd18e611864f26"
55
},
66
"nbformat": 3,
77
"nbformat_minor": 0,
@@ -392,6 +392,25 @@
392392
"metadata": {},
393393
"outputs": []
394394
},
395+
{
396+
"cell_type": "markdown",
397+
"metadata": {},
398+
"source": [
399+
"It's also possible to loop through the keys and values of a dictionary using the items method.\n",
400+
"Let's loop through the words dictionary and see how this works:"
401+
]
402+
},
403+
{
404+
"cell_type": "code",
405+
"collapsed": false,
406+
"input": [
407+
"for key, value in words.items():\n",
408+
" print(key, value)"
409+
],
410+
"language": "python",
411+
"metadata": {},
412+
"outputs": []
413+
},
395414
{
396415
"cell_type": "markdown",
397416
"metadata": {},

0 commit comments

Comments
 (0)