def med_product(l):
    """Takes a list of numbers and returns their product. A list of length 1 should return its sole element, and a list of length 0 should return 1."""
    return 1 if not l else l[0] * med_product(l[1:])