{"title":"\u3010Python\u3011\u6761\u4ef6\u306b\u4e00\u81f4\u3059\u308b\u8981\u7d20\u3092\u5224\u5b9a\u30fb\u62bd\u51fa\u3059\u308b\u65b9\u6cd5\uff5call / any / \u30ea\u30b9\u30c8\u5185\u5305\u8868\u8a18","type":"rich","version":"1.0","categories":["Python"],"height":"190","provider_name":"Hatena Blog","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/r/round-rand/20260510/20260510185522.png","blog_title":"\u30e9\u30f3\u30c9ML","published":"2026-05-12 00:00:00","description":"\u5168\u3066\u306e\u8981\u7d20\u304c\u6761\u4ef6\u3092\u6e80\u305f\u3059\u304b\u5224\u5b9a\u3059\u308b\uff08all\uff09 1\u3064\u3067\u3082\u6761\u4ef6\u3092\u6e80\u305f\u3059\u304b\u5224\u5b9a\u3059\u308b\uff08any\uff09 \u6761\u4ef6\u3092\u6e80\u305f\u3059\u8981\u7d20\u3092\u53d6\u308a\u51fa\u3059 \u53c2\u8003 \u5168\u3066\u306e\u8981\u7d20\u304c\u6761\u4ef6\u3092\u6e80\u305f\u3059\u304b\u5224\u5b9a\u3059\u308b\uff08all\uff09 \u30ea\u30b9\u30c8\u306e\u5168\u8981\u7d20\u304c\u6307\u5b9a\u6761\u4ef6\u3092\u6e80\u305f\u3059\u304b\u3069\u3046\u304b\u306fall\u3067\u5224\u65ad\u3067\u304d\u308b\u3002 \u5168\u8981\u7d20\u304c\u6761\u4ef6\u3092\u6e80\u305f\u3059\u5834\u5408\u306fTrue\u30011\u3064\u3067\u3082\u6761\u4ef6\u3092\u6e80\u305f\u3055\u306a\u3044\u306fFalse\u306b\u306a\u308b\u3002 nums = [1, 2, 3] # \u30b1\u30fc\u30b91:True\u306b\u306a\u308b\u5834\u5408 result1 = all(x < 4 for x in nums) print(result1) # => True # \u30b1\u30fc\u30b92:False\u306b\u306a\u308b\u5834\u5408 result2 = all(x < 3 for x in nu\u2026","width":"100%","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fml-rand-note.hatenablog.com%2Fentry%2Fpython%2Fall-any-list-comprehension\" title=\"\u3010Python\u3011\u6761\u4ef6\u306b\u4e00\u81f4\u3059\u308b\u8981\u7d20\u3092\u5224\u5b9a\u30fb\u62bd\u51fa\u3059\u308b\u65b9\u6cd5\uff5call / any / \u30ea\u30b9\u30c8\u5185\u5305\u8868\u8a18 - \u30e9\u30f3\u30c9ML\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://ml-rand-note.hatenablog.com/","author_name":"round-rand","url":"https://ml-rand-note.hatenablog.com/entry/python/all-any-list-comprehension","author_url":"https://blog.hatena.ne.jp/round-rand/"}