Develogger: codecsで使えるエンコーディング (http://www.r-stone.net/blogs/satoshi/2008/02/codecs.html) Pythonのcodecsで使用できるエンコーディングは「encodings」モジュールにあるようです。 ... WindowsXPでは「C:\Python25\Lib\encodings」になります。 リストを先読みするには以下のようにイテレータを複製して、ポインタを必要な分だけ進めておく。そして並列に回す。 >>> from itertools import * >>> xs = range(7) >>> xs1 = chain(xs, [None, None]) >>> xs1, xs2, xs3 = tee(xs1, 3) >>> xs2.next() 0 >>> xs3.next(); xs3.next
![2008-10-20 - プログラミング日記 - 再帰の考え方](https://cdn-ak-scissors.b.st-hatena.com/image/square/06a15c64ba0ceec233d86d71001ebb29a9dcbf5d/height=288;version=1;width=512/https%3A%2F%2Fcdn.blog.st-hatena.com%2Fimages%2Ftheme%2Fog-image-1500.png)