Loading
Write `precision_recall(retrieved, relevant)` that returns a tuple `(precision, recall)`. Precision is the share of retrieved ids that are relevant; recall is the share of relevant ids that were retrieved. Use 0.0 when the denominator is zero.
Turn both into sets first. hits = len(set(retrieved) & set(relevant)).