Skip to content

Commit 46cba8c

Browse files
edit any and list comprehension
1 parent 3da19ba commit 46cba8c

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Chapter1/list/apply_functions_to_elements.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
"id": "76e8e609",
274274
"metadata": {},
275275
"source": [
276-
"### Use any and List Comprehension Instead of an If-Else Statement "
276+
"### Use any and List Comprehension for List Condition Checking"
277277
]
278278
},
279279
{

docs/Chapter1/list/apply_functions_to_elements.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ <h2> Contents </h2>
518518
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#filter-get-the-elements-of-an-iterable-that-a-function-evaluates-true">2.3.5.3. filter: Get the Elements of an Iterable that a Function Evaluates True</a></li>
519519
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#map-method-apply-a-function-to-each-item-of-an-iterable">2.3.5.4. map method: Apply a Function to Each Item of an Iterable</a></li>
520520
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#sort-sort-a-list-of-tuples-by-the-first-or-second-item">2.3.5.5. sort: Sort a List of Tuples by the First or Second Item</a></li>
521-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#use-any-and-list-comprehension-instead-of-an-if-else-statement">2.3.5.6. Use any and List Comprehension Instead of an If-Else Statement</a></li>
521+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#use-any-and-list-comprehension-for-list-condition-checking">2.3.5.6. Use any and List Comprehension for List Condition Checking</a></li>
522522
</ul>
523523
</nav>
524524
</div>
@@ -641,8 +641,8 @@ <h2><span class="section-number">2.3.5.5. </span>sort: Sort a List of Tuples by
641641
</div>
642642
</div>
643643
</section>
644-
<section id="use-any-and-list-comprehension-instead-of-an-if-else-statement">
645-
<h2><span class="section-number">2.3.5.6. </span>Use any and List Comprehension Instead of an If-Else Statement<a class="headerlink" href="#use-any-and-list-comprehension-instead-of-an-if-else-statement" title="Permalink to this heading">#</a></h2>
644+
<section id="use-any-and-list-comprehension-for-list-condition-checking">
645+
<h2><span class="section-number">2.3.5.6. </span>Use any and List Comprehension for List Condition Checking<a class="headerlink" href="#use-any-and-list-comprehension-for-list-condition-checking" title="Permalink to this heading">#</a></h2>
646646
<p>If you want to check whether a statement is <code class="docutils literal notranslate"><span class="pre">True</span></code> for one or more items in a list, using <code class="docutils literal notranslate"><span class="pre">any</span></code> and list comprehension is simpler than using a for-loop and an if-else statement.</p>
647647
<div class="cell docutils container">
648648
<div class="cell_input docutils container">
@@ -762,7 +762,7 @@ <h2><span class="section-number">2.3.5.6. </span>Use any and List Comprehension
762762
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#filter-get-the-elements-of-an-iterable-that-a-function-evaluates-true">2.3.5.3. filter: Get the Elements of an Iterable that a Function Evaluates True</a></li>
763763
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#map-method-apply-a-function-to-each-item-of-an-iterable">2.3.5.4. map method: Apply a Function to Each Item of an Iterable</a></li>
764764
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#sort-sort-a-list-of-tuples-by-the-first-or-second-item">2.3.5.5. sort: Sort a List of Tuples by the First or Second Item</a></li>
765-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#use-any-and-list-comprehension-instead-of-an-if-else-statement">2.3.5.6. Use any and List Comprehension Instead of an If-Else Statement</a></li>
765+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#use-any-and-list-comprehension-for-list-condition-checking">2.3.5.6. Use any and List Comprehension for List Condition Checking</a></li>
766766
</ul>
767767
</nav></div>
768768

docs/_sources/Chapter1/list/apply_functions_to_elements.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
"id": "76e8e609",
274274
"metadata": {},
275275
"source": [
276-
"### Use any and List Comprehension Instead of an If-Else Statement "
276+
"### Use any and List Comprehension for List Condition Checking"
277277
]
278278
},
279279
{

docs/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)