私はPythonで関数型プログラミングに興味があり、Mary Rose Cookのブログ記事A practical introduction to functional programmingを使って作業しています。どうやら、それはこのようパイソン2で書かれていたpythonで地図関数の問題を解決する3 vs python 2
:Pythonの3つの利回りこの中
name_lengths = map(len, ["Mary", "Isla", "Sam"])
print name_lengths
# => [4, 4, 3]
:これはされているのはなぜ
- :
<map object at 0x100b87a20>
私は2つの質問を持っていますそう?
- converting the map object to a list and then use numpy以外の解決策はありますか? Pythonの3で、それはイテレータを返しながらmigration guideに、文書よう