You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Chapter1/list/apply_functions_to_elements.html
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -518,7 +518,7 @@ <h2> Contents </h2>
518
518
<liclass="toc-h2 nav-item toc-entry"><aclass="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>
519
519
<liclass="toc-h2 nav-item toc-entry"><aclass="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>
520
520
<liclass="toc-h2 nav-item toc-entry"><aclass="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
-
<liclass="toc-h2 nav-item toc-entry"><aclass="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
+
<liclass="toc-h2 nav-item toc-entry"><aclass="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>
522
522
</ul>
523
523
</nav>
524
524
</div>
@@ -641,8 +641,8 @@ <h2><span class="section-number">2.3.5.5. </span>sort: Sort a List of Tuples by
<h2><spanclass="section-number">2.3.5.6. </span>Use any and List Comprehension Instead of an If-Else Statement<aclass="headerlink" href="#use-any-and-list-comprehension-instead-of-an-if-else-statement" title="Permalink to this heading">#</a></h2>
<h2><spanclass="section-number">2.3.5.6. </span>Use any and List Comprehension for List Condition Checking<aclass="headerlink" href="#use-any-and-list-comprehension-for-list-condition-checking" title="Permalink to this heading">#</a></h2>
646
646
<p>If you want to check whether a statement is <codeclass="docutils literal notranslate"><spanclass="pre">True</span></code> for one or more items in a list, using <codeclass="docutils literal notranslate"><spanclass="pre">any</span></code> and list comprehension is simpler than using a for-loop and an if-else statement.</p>
647
647
<divclass="cell docutils container">
648
648
<divclass="cell_input docutils container">
@@ -762,7 +762,7 @@ <h2><span class="section-number">2.3.5.6. </span>Use any and List Comprehension
762
762
<liclass="toc-h2 nav-item toc-entry"><aclass="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>
763
763
<liclass="toc-h2 nav-item toc-entry"><aclass="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>
764
764
<liclass="toc-h2 nav-item toc-entry"><aclass="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
-
<liclass="toc-h2 nav-item toc-entry"><aclass="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
+
<liclass="toc-h2 nav-item toc-entry"><aclass="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>
0 commit comments