Cheapest path through a grid

grid is a list of lists of non-negative numbers. Write min_path(grid) that returns the smallest sum of values along a path from the top-left to the bottom-right moving only right or down.

min_path([[1, 3, 1], [1, 5, 1], [4, 2, 1]])  ->  7
min_path([[1, 2], [1, 1]])                   ->  3

The point is to practise a 2-D DP with min instead of a sum of ways.

def min_path(grid):
    ...