{"blog_url":"https://nainaistar.hatenablog.com/","height":"190","published":"2023-04-10 12:00:00","description":"\u8f9e\u66f8\u578b\u306e\u5024\u304cNone\u306e\u5834\u5408\u306b\u3001\u30ad\u30fc\u3092\u524a\u9664\u3057\u305f\u3044\u3053\u3068\u304c\u3042\u3063\u305f\u306e\u3067\u6b8b\u3057\u307e\u3059\u3002 \u524d\u63d0 Python 3.11 \u5bfe\u5fdc \u8f9e\u66f8\u578b\u306e\u5024\u304cNone\u306e\u3068\u304d\u3001\u30ad\u30fc\u3092\u524a\u9664\u3059\u308b\u306e\u306f\u6b21\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3002 {k: v for k, v in dict.items() if v is not None} dict = {\"a\": \"1\", \"b\": \"2\", \"c\": None} all_key_has_value_dict = {k: v for k, v in dict.items() if v is not None} # {\"a\": \"1\", \"b\": \"2\"} \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9 https://github.com/hi\u2026","provider_url":"https://hatena.blog","provider_name":"Hatena Blog","width":"100%","type":"rich","categories":["Python","\u6280\u8853"],"author_name":"nainaistar","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/n/nainaistar/20230408/20230408162159.png","blog_title":"\u304d\u308a\u4e38\u306e\u6280\u8853\u65e5\u8a18","title":"Python\u306e\u8f9e\u66f8\u578b\u306e\u5024\u304cNone\u306a\u3089\u30ad\u30fc\u3092\u524a\u9664\u3059\u308b\uff08value-is-none-so-remove-key-in-Python-dictionary\uff09","author_url":"https://blog.hatena.ne.jp/nainaistar/","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnainaistar.hatenablog.com%2Fentry%2Fvalue-is-none-so-remove-key-in-python-dictionary\" title=\"Python\u306e\u8f9e\u66f8\u578b\u306e\u5024\u304cNone\u306a\u3089\u30ad\u30fc\u3092\u524a\u9664\u3059\u308b\uff08value-is-none-so-remove-key-in-Python-dictionary\uff09 - \u304d\u308a\u4e38\u306e\u6280\u8853\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://nainaistar.hatenablog.com/entry/value-is-none-so-remove-key-in-python-dictionary"}