2020/24.py
def pos(directions):
    """
    Given a set of directions, figure out the actual index on the (x,y) coordinate grid.
    """
    x, y = 0, 0
    for dx, dy in directions:
        x, y = x + dx, y + dy
    return x, y

    Given a set of directions, figure out the actual index on the (x,y) coordinate grid.
    
Given a set of directions, figure out the actual index on the (x,y) coordinate grid.
Given a set of directions figure out the actual index on the ( x y ) coordinate grid .
def pos(directions):
    x, y = 0, 0
    for dx, dy in directions:
        x, y = x + dx, y + dy
    return x, y
def pos ( directions ) : x , y = 0 , 0 for dx , dy in directions : x , y = x + dx , y + dy return x , y
Given a set of directions, figure out the actual index on the (x,y) coordinate grid.
Given a set of directions figure out the actual index on the ( x y ) coordinate grid .
"""
    Given a set of directions, figure out the actual index on the (x,y) coordinate grid.
    """
directions