2011-06-01から1日間の記事一覧
>>> import time >>> def gen(): ... c = 0 ... while(True): ... c += 1 ... yield c ... >>> for i in gen(): ... print i ... time.sleep(1) ... 1 2 3 4 5 6 ^CTraceback (most recent call last): File "<stdin>", line 3, in <module> KeyboardInterrupt >>> まぁ、だ</module></stdin>…