Files
Learn-Python-Programming-Th…/ch05/maxims.py
T
adii1823 ef37ce0c4e ch05
2021-10-28 17:38:16 +05:30

10 lines
216 B
Python

# maxims.py
# This is not a valid Python module - Don't run it.
>>> a = [5, 9, 2, 4, 7]
>>> b = [3, 7, 1, 9, 2]
>>> c = [6, 8, 0, 5, 3]
>>> maxs = map(lambda n: max(*n), zip(a, b, c))
>>> list(maxs)
[6, 9, 2, 9, 7]