We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b0688e commit 52c9170Copy full SHA for 52c9170
notebooks/intermediate/idiomatic_loops.ipynb
@@ -332,10 +332,9 @@
332
"source": [
333
"found = False\n",
334
"for val in data:\n",
335
- " if isinstance(val, str):\n",
336
- " if val.lower() == 'python':\n",
337
- " found = True\n",
338
- " break\n",
+ " if str(val).lower() == 'python':\n",
+ " found = True\n",
+ " break\n",
339
"if not found:\n",
340
" raise ValueError(\"Nope, couldn't find.\")"
341
]
@@ -354,9 +353,8 @@
354
353
"outputs": [],
355
356
357
358
359
360
"else:\n",
361
362
0 commit comments