{"title":"\u4e09\u9805\u6f14\u7b97\u5b50\u3092\u4f7f\u3044\u305f\u3044","blog_url":"https://pythonco.hatenadiary.org/","type":"rich","url":"https://pythonco.hatenadiary.org/entry/20060916/p1","image_url":null,"author_url":"https://blog.hatena.ne.jp/pythonco/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpythonco.hatenadiary.org%2Fentry%2F20060916%2Fp1\" title=\"\u4e09\u9805\u6f14\u7b97\u5b50\u3092\u4f7f\u3044\u305f\u3044 - pythonco(\u3071\u3044\u305d\u3093\u3053)\u306e\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>","provider_url":"https://hatena.blog","description":"Python\u306b\u306f\u4e09\u9805\u6f14\u7b97\u5b50\u304c\u3042\u308a\u307e\u305b\u3093\u304c\u3001and\u3068or\u3092\u4f7f\u3063\u3066\u4e09\u9805\u6f14\u7b97\u5b50\u3063\u307d\u304f\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 def abs1(n): if n > 0: return n else: return -n def abs2(n): return n > 0 and n or -n print abs1(123) # => 123 print abs1(-123) # => 123 print abs2(123) # => 123 print abs2(-123) # => 123\u7c21\u5358\u306b\u66f8\u304f\u3068 \u6761\u4ef6(\u4ee5\u4e0bA) and \u6761\u4ef6\u304c\u771f\u306e\u3068\u304d(\u4ee5\u4e0bB) or \u6761\u4ef6\u304c\u507d\u306e\u3068\u304d(\u4ee5\u4e0bC)\u3068\u3044\u3046\u5f0f\u306f (A and B) \u2026","published":"2006-09-16 00:00:00","width":"100%","provider_name":"Hatena Blog","blog_title":"pythonco(\u3071\u3044\u305d\u3093\u3053)\u306e\u65e5\u8a18","author_name":"pythonco","categories":[],"height":"190","version":"1.0"}