python map
时间: 2023-09-05 18:08:23 浏览: 91
python nmap
在Python中,`map()`函数用于对一个可迭代对象的所有元素应用一个指定的函数。在Python2中,`map()`函数返回一个包含多个元组的列表,其中每个元组包含对应索引的元素。而在Python3中,`map()`函数返回一个map对象,如果不指定函数参数,则需要将map对象转换为列表对象。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Python中很常用的函数map(),一起来看看用法](https://blog.csdn.net/weixin_44793743/article/details/126812868)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [内置函数sorted, map(Python)](https://blog.csdn.net/qq_49644209/article/details/112151982)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文