Python标准库:内置函数map(function, iterable, …)

本函数是把函数对象function作为函数,iterable对象的每项作为参数,然落后行计算后输出迭代子iterator。如果函数对象function可以输入多参数,那末后面可以跟多个可迭代的对象。多个迭代对象时,以最短的对象为运行结果的判断。

例子:

#map()

x = range(10)
print(list(map(hex, x)))
print(list(map(lambda y : y * 2 + 1, x)))
print(list(map(lambda y, z : y * 2 + z, x, x)))

结果输出以下:

[‘0x0’, ‘0x1’, ‘0x2’, ‘0x3’, ‘0x4’, ‘0x5’, ‘0x6’, ‘0x7’, ‘0x8’, ‘0x9’]

[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]

[0, 3, 6, 9, 12, 15, 18, 21, 24, 27]

 

蔡军生  QQ:9073204 深圳

波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!

波比源码 » Python标准库:内置函数map(function, iterable, …)

132 评论

  1. priligy without prescription priligy ca synthroid 150mcg drug

  2. buy spiriva 9 mcg sale minocin 50mg ca purchase hytrin online cheap

  3. doxycycline without prescription albuterol 2mg uk cost clindamycin

  4. buy fosamax 35mg generic brand ibuprofen buy ibuprofen sale

  5. price of ivermectin liquid top ed pills deltasone 20mg us

  6. buy levaquin without a prescription ursodiol online generic bupropion

  7. purchase tadalafil pills cialis 40mg tablet buy erectile dysfunction medication

  8. how to get modafinil without a prescription modafinil drug buy deltasone 5mg pill

  9. order zestril online cheap omeprazole pill metoprolol generic

  10. order sumycin without prescription lioresal us buy baclofen 25mg for sale

  11. buy ipratropium 100 mcg online cheap buy combivent purchase linezolid without prescription

  12. tadalafil us cialis 5mg sildenafil 100mg england

  13. minocycline 50mg without prescription order minocin generic pioglitazone 30mg without prescription

  14. purchase acetazolamide online diamox price buy imuran 50mg online cheap

  15. Thank you for great article. Hello Administ . Website Giriş için Tıklayin. onwin

  16. order celebrex 100mg without prescription flomax 0.2mg pill order zofran 8mg for sale

  17. order aldactone 100mg generic buy zocor cheap buy valtrex without a prescription

  18. imuran us lanoxin order purchase telmisartan without prescription

  19. buy fexofenadine pills oral altace 10mg buy glimepiride generic

  20. generic avapro 150mg order irbesartan pill where to buy buspirone without a prescription

  21. captopril 25mg sale candesartan sale buy cheap generic carbamazepine

  22. order ciprofloxacin 500mg online cheap duricef cost buy duricef no prescription

评论已关闭

Hi, 如果你对这款模板有疑问,可以跟我联系哦!

联系站长
赞助VIP 享更多特权,建议使用 QQ 登录
喜欢我嘛?喜欢就按“ctrl+D”收藏我吧!♡