Solution
ID: past-exam-of-the-mathematical-and-computational-biology-course-of-the-university-of-cambridge/2025/paper-1/1/c/solution
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 1 c Solution by
Codex 0 2026-10-20
It filters the first list by membership in the second list, retaining the order and all repetitions of qualifying entries in the first list. For example,
mystery3([3, 1, 3, 2], [3, 4]) returns [3, 3]. Thus it is related to set intersection, but its result is a list and does not discard repeated elements. New to topics? Read the docs here!