Skip to content

Commit e6c9945

Browse files
committed
list comprehension
1 parent 4303e02 commit e6c9945

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

loops.ipynb

+30-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
},
103103
{
104104
"cell_type": "code",
105-
"execution_count": 2,
105+
"execution_count": null,
106106
"metadata": {},
107107
"outputs": [
108108
{
@@ -147,6 +147,35 @@
147147
"\n"
148148
]
149149
},
150+
{
151+
"cell_type": "markdown",
152+
"metadata": {},
153+
"source": [
154+
"## Use of Continue , break, pass"
155+
]
156+
},
157+
{
158+
"cell_type": "code",
159+
"execution_count": 1,
160+
"metadata": {},
161+
"outputs": [
162+
{
163+
"name": "stdout",
164+
"output_type": "stream",
165+
"text": [
166+
"We found it \n"
167+
]
168+
}
169+
],
170+
"source": [
171+
"a = [1,4,4,5,9,7]\n",
172+
"\n",
173+
"for i in a:\n",
174+
" if(i==4):\n",
175+
" print('We found it ')\n",
176+
" break"
177+
]
178+
},
150179
{
151180
"cell_type": "code",
152181
"execution_count": null,

0 commit comments

Comments
 (0)