from itertools import * # JavaScript で言う Array.prototype.find()的なやつだゾ predicate = lambda tag: tag['Key'] == 'Name' found = next(ifilter(predicate, list), None) # null 判定 # == None で比較は良くないらしいゾ if found is not None: print ‘mitsuketa_zo’ # 後置ifもあるゾ result = ‘mitsuketa_zo’ if found is not None else ‘nai_zo’