<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>round-rand</author_name>
  <author_url>https://blog.hatena.ne.jp/round-rand/</author_url>
  <blog_title>ランドML</blog_title>
  <blog_url>https://ml-rand-note.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>全ての要素が条件を満たすか判定する（all） 1つでも条件を満たすか判定する（any） 条件を満たす要素を取り出す 参考 全ての要素が条件を満たすか判定する（all） リストの全要素が指定条件を満たすかどうかはallで判断できる。 全要素が条件を満たす場合はTrue、1つでも条件を満たさないはFalseになる。 nums = [1, 2, 3] # ケース1:Trueになる場合 result1 = all(x &lt; 4 for x in nums) print(result1) # =&gt; True # ケース2:Falseになる場合 result2 = all(x &lt; 3 for x in nu…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fml-rand-note.hatenablog.com%2Fentry%2Fpython%2Fall-any-list-comprehension&quot; title=&quot;【Python】条件に一致する要素を判定・抽出する方法｜all / any / リスト内包表記 - ランドML&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/r/round-rand/20260510/20260510185522.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-05-12 00:00:00</published>
  <title>【Python】条件に一致する要素を判定・抽出する方法｜all / any / リスト内包表記</title>
  <type>rich</type>
  <url>https://ml-rand-note.hatenablog.com/entry/python/all-any-list-comprehension</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
