Python でブロックスコープ的な for 文
Re: http://subtech.g.hatena.ne.jp/cho45/20090115/1232016840
import sys a = ['a','b','c',] for i in range(len(a)): (lambda item,index : sys.stdout.write(str([item,index]) + '\n') )(a[i],i)
式しか書けないけどw
Re: http://subtech.g.hatena.ne.jp/cho45/20090115/1232016840
import sys a = ['a','b','c',] for i in range(len(a)): (lambda item,index : sys.stdout.write(str([item,index]) + '\n') )(a[i],i)
式しか書けないけどw