Вход для клиентов и другие ссылки в главном меню Не активируются (Magento)

# combining the insights from Aaron Hall and Hai Vu,
# we get:

def pastri(n):
    rows = [[1]]
    for _ in range(1, n+1):
        rows.append([1] +
                    [sum(pair) for pair in zip(rows[-1], rows[-1][1:])] +
                    [1])
    return rows

# thanks! learnt that "shape shifting" data,
# can yield/generate elegant solutions.
0
задан Eugene Sajine 25 February 2015 в 16:49
поделиться