Skip to content

Commit 0f7183b

Browse files
committed
change variable name and update comment
1 parent 39d5157 commit 0f7183b

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

built_in_functions/map.ipynb

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
{
2525
"cell_type": "code",
26-
"execution_count": 11,
26+
"execution_count": 1,
2727
"metadata": {},
2828
"outputs": [
2929
{
@@ -49,12 +49,12 @@
4949
"cell_type": "markdown",
5050
"metadata": {},
5151
"source": [
52-
"Map allows us to implement this in a much simpler and nicer way. Here you go:"
52+
"Map allows us to implement this in a much simpler and nicer way:"
5353
]
5454
},
5555
{
5656
"cell_type": "code",
57-
"execution_count": 12,
57+
"execution_count": 2,
5858
"metadata": {},
5959
"outputs": [
6060
{
@@ -86,7 +86,7 @@
8686
},
8787
{
8888
"cell_type": "code",
89-
"execution_count": 13,
89+
"execution_count": 3,
9090
"metadata": {},
9191
"outputs": [
9292
{
@@ -100,10 +100,10 @@
100100
],
101101
"source": [
102102
"items = [1, 2, 3, 4, 5]\n",
103-
"squared = list(map(lambda x: x**2, items))\n",
103+
"squared_items = list(map(lambda x: x**2, items))\n",
104104
"\n",
105105
"print(items)\n",
106-
"print(squared)"
106+
"print(squared_items)"
107107
]
108108
},
109109
{
@@ -115,7 +115,7 @@
115115
},
116116
{
117117
"cell_type": "code",
118-
"execution_count": 16,
118+
"execution_count": 4,
119119
"metadata": {},
120120
"outputs": [
121121
{
@@ -143,13 +143,6 @@
143143
" value = list(map(lambda x: x(i), funcs))\n",
144144
" print(value)"
145145
]
146-
},
147-
{
148-
"cell_type": "code",
149-
"execution_count": null,
150-
"metadata": {},
151-
"outputs": [],
152-
"source": []
153146
}
154147
],
155148
"metadata": {

0 commit comments

Comments
 (0)