Python函数-map 函数
<p>说明</p>
<pre><code>(1)map函数批量执行。
(2)map将后面的序列,作为前面函数的参数进行依次调用,要求,序列的个数和函数参数的个数要对应。</code></pre>
<p>案例</p>
<pre><code>def hello(a,b):
return a+b
print(map(hello,range(1,6),range(6,11)))
输出:
<map object at 0x00311390> #此方法待验证,输出应该是[7,9,11,13,15];即:1+6;2+7;3+8;4+9;5+10;</code></pre>