# Task
Given the birthdates of two people, find the date when the younger one is exactly half the age of the other.
# Notes
* The dates are given in the format YYYY-MM-DD and are not sorted in any particular order
* Round **down** to the nearest day
* Return the result as a string, like the input dates
from datetime import datetime as dt

def half_life(p1, p2):
    d1, d2 = (dt.strptime(p, "%Y-%m-%d") for p in sorted((p1, p2)))
    return (d2 + (d2 - d1)).strftime("%Y-%m-%d")
from datetime import datetime as dt

def half_life(p1, p2):
    d1, d2 = (dt.strptime(p, "%Y-%m-%d") for p in sorted((p1, p2)))
    return (d2 + (d2 - d1)).strftime("%Y-%m-%d")