Another "relaxing" day. Given a tree structure of things orbiting other things, find the "total number of direct and indirect orbits", i.e. the sum of the depths of objects in the tree. One recursive function later:

orbits = {}
for (a, b) in pairs:
    if a not in orbits:
        dict[a] = None
    dict[b] = a

def score(planet):
    if orbits[planet] is None:
        return 0
    else:
        return 1 + score(orbits[planet])

answer = sum([score(planet) for planet in orbits])

Part 2 wants us to find the distance from one object in the tree, yourself, to another, Santa. I took the approach of finding the path up to the root for each object, and taking the combined distance to the point where the two paths intersect.

def get_path(object):
    path = {}
   	at = object
    distance = 0
    while currently_at is not None:
        path[orbit[planets]] = distance
        at = orbits[planet]
        distance += 1
    return path

santa = get_path('SAN')
you = get_path('YOU')

answer = min([santa[at] + you[at] for at in santa if at in you])