- python provides a general purpose HOP,map
- simple form-a unary function and a collection of suitable arguments
代码:
for e in map(abs,[1,-2,3,-4]):
print(e)
1 2 3 4
L1=[1,28,36]
L2=[2,57,9]
for e in map(min,L1,L2):
print(e)
1 28 9
代码:
for e in map(abs,[1,-2,3,-4]):
print(e)
1 2 3 4
L1=[1,28,36]
L2=[2,57,9]
for e in map(min,L1,L2):
print(e)
1 28 9
转载于:https://www.cnblogs.com/Bella2017/p/7978895.html