关系映射
# map两个参数,一个为函数,另一个为可迭代对象
map(lambda x:x + 1, iterable)
map数组直接解包
a = [1,2,3,4,5]
b = [*map(lambda x:x*3, a)]
b # [3, 6, 9, 12, 15]
* / **
解压参数列表
https://docs.python.org/3/tutorial/controlflow.html#unpacking-argument-lists
http://wulc.me/2016/09/01/python%20%E4%B8%AD%E6%98%9F%E5%8F%B7%E5%8F%82%E6%95%B0%E4%BC%A0%E9%80%92/
https://blog.csdn.net/DawnRanger/article/details/78028171
网友评论