Question: . (12 points) Define a Python function intersect that takes two lists as parameters and returns a new list that contains all of the

. (12 points) Define a Python function intersect that takes two lists as parameters and returns a new list that contains all of the items that the two lists have in common (i.e., those items that appear in both of the lists). For example, your function should have the following behavior: >>> one >>> one [] intersect ([1, 2, 3, 4, 5], [6, 7, 8]) >>> two intersect ([1, 3, 5, 6, 2, 41, 18, 6, 4, 7, 2, 9, 3,01) >>> two [3,6,2,4] You may assume that neither list contains any duplicate entries. The order that elements appear in the generated list is unimportant. PS: DO NOT use intersaction method.
Step by Step Solution
There are 3 Steps involved in it
Here is a Python function intersect that achieves the desired be... View full answer
Get step-by-step solutions from verified subject matter experts
