python3中map的问题
来源:互联网 发布:数据分析职业 编辑:程序博客网 时间:2024/04/30 08:18
突然在Python3中发现不能用map函数了,,,,在python2中,map会直接返回结果
查了资料才知道到了python3, 返回的就是一个map对象,要想用到结果需要在前面加上list,比如:
s=map(str,range(100))
在python2中是能够直接出来结果的,但是在python3中这个会返回一个对象。
要想用到结果就必须的在前面加上list来转化一下,比如:
s=list(map(str,range(100)))
Over
0 0
- python3中map的问题
- Python3中map函数的问题
- python3中输出map的问题
- 转载-Python3中map函数的问题
- python3的map问题
- python3的map函数显示问题
- python3中map函数的改动
- Python3中的map问题
- python3中input的问题
- TypeError: unhashable type: 'matrix'解决方法 以及 Python3下map函数的显示问题、 python numpy中nonzero()的用法
- Python3中使用map()结果出错的解决方法
- python3 中map和python2中 map的区别,超级实用
- Python3中关于中文编码的问题
- python3中ascii字节不够的问题
- python3中json.dumps()的问题
- python3中关于列表复制的问题
- python3 中多继承的顺序问题
- Java中Map的问题
- hibernate annotation注解方式来处理映射关系
- java面向对象基础知识(二)
- css3 background-size属性--ie兼容
- 如何防止短信验证码被恶意点击
- thinkphp3.2完全开发手册摘要
- python3中map的问题
- Tomcat 的三种(bio,nio.apr) 高级 Connector 运行模式
- Android6.0以上权限检查
- 学习Android遇到的问题——LayoutInflater
- JVM -verbose参数详解
- 【Java】正则表达式
- ajax返回结果后跳转无效问题
- android HttpURLConnection网络访问
- android实例源码