2013-08-12から1日間の記事一覧

pythonのitertoolsのrecipeのメモ

公式にitertoolsのrecipe集があるのでそれのメモ. バージョン: python3.3 参考: itertools — Functions creating iterators for efficient looping — Python 3.7.3 documentation ・take(n,iterable) 最初のn個の要素をリストとして返します from itertools…

pythonのitertoolsメモ

バージョン: python3.3 参考: http://docs.python.org/3/library/itertools.html itertoolsのpythonによる実装が書いてあるので勉強になります. ・itertools.accumulate(iterable[, func]) In [2]: it = itertools.accumulate([1,2,3]) In [3]: for i in it…