摘要: 1. map()是 Python内置的高阶函数,它接收一个函数 f 和一个 list,并通过把函数 f 依次作用在 list 的每个元素上。 python2中,得到一个新的 list 并返回。 >>> res = map(float, [1,2,3,4]) >>> res [1.0, 2.0, 3. 阅读全文
posted @ 2020-05-21 12:27 AliceYing 阅读(607) 评论(0) 推荐(0)