Solving the sliding pyramid problem in Python3
My main critiques are:


doug is a baffling variable name.
You shouldn't have to store the entire file in memory, nor should you have to invert the triangle.  Doing so hurts scalability.  You should be able to process each line as you read it.


Instead of your build_tree() implementation, I recommend using a generator function to parse the input, such that you only need to store one line at a time.

min_sum() could be made more elegant without relying so much on indexes.

def triangle_rows(filename):
    with open(filename) as f:
        int(next(f))    # Skip first line, which specifies the number of rows
        for line in f:
            yield [int(entry) for entry in line.split()]

def min_sum(triangle):
    row = next(triangle)
    for row_below in triangle:
        row = [min(l, r) for l, r in zip(
            [a + b for a, b in zip(row + [row[-1]], row_below)],
            [a + b for a, b in zip([row[0]] + row, row_below)]
        )]
    return min(*row)

if __name__ == '__main__':
    print(min_sum(triangle_rows('input.txt')))