python2中:
map(func, list)会直接返回一个list
但是python3中
map(func, list)则只会返回一个map对象
想要返回list,只能list(map)
但是!!这个map对象是可以直接用于列表生成式的:
python2中:
map(func, list)会直接返回一个list
但是python3中
map(func, list)则只会返回一个map对象
想要返回list,只能list(map)
但是!!这个map对象是可以直接用于列表生成式的: