python-Generalization of Hops
- 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