po_slozkach.py 140 Bytes
Newer Older
Mareš Martin's avatar
Mareš Martin committed
1
2
3
4
5
6
# Spočítá z[i] = f(x[i], y[i])
def po_slozkach(f, a, b):
    return [ f(x, y) for x, y in zip(a, b) ]

def secti(x, y):
    return x + y