def all_paths(r, c):
    current = triangle[r][c]
if r < len(triangle) - 1:
    below_paths = all_paths(r + 1, c) + all_paths(r + 1, c + 1)
Project Euler #18 - how to brute force all possible paths in tree-like structure using Python?