{"title":"\u518d\u5e30\u3092\u5b9f\u88c5\u3057\u3066\u307f\u308b","provider_url":"https://hatena.blog","type":"rich","height":"190","blog_url":"https://seinzumtode.hatenadiary.jp/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fseinzumtode.hatenadiary.jp%2Fentry%2F20130525%2F1369446942\" title=\"\u518d\u5e30\u3092\u5b9f\u88c5\u3057\u3066\u307f\u308b - how to code something\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","blog_title":"how to code something","description":"\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u652f\u3048\u308b\u6280\u8853\u3092\u8aad\u3093\u3067\u3066\u518d\u5e30\u306e\u8a71\u304c\u51fa\u3066\u304d\u305f\u306e\u3067 \u8aad\u3080\u524d\u306b\u307e\u305a\u81ea\u5206\u3067\u5b9f\u88c5\u3057\u3066\u307f\u305f\u3002 #/usr/bin/env python #-*-coding:utf-8-*- array = [1,2,[3,4],5] def summation(array): total = 0 for a in array: if(type(a) == type(array)): total += summation(a) else: total += a return total print summation(array) Python\u306b\u306f\u6574\u6570\u306a\u306e\u304b\u30ea\u30b9\u30c8\u304b\u3069\u3046\u304b\u5224\u5b9a\u3059\u308b\u95a2\u6570\uff08type()\uff09\u304c \u3042\u3063\u305f\u304b\u2026","version":"1.0","author_url":"https://blog.hatena.ne.jp/seinzumtode/","published":"2013-05-25 10:55:42","categories":[],"author_name":"seinzumtode","image_url":null,"url":"https://seinzumtode.hatenadiary.jp/entry/20130525/1369446942","width":"100%"}