Question: PYTHON - Write a function named num_in_common that accepts two lists of integers as parameters and returns the count of how many unique integers occur
PYTHON - Write a function named num_in_common that accepts two lists of integers as parameters and returns the count of how many unique integers occur in both lists. For example, if two lists named l1 and l2 contains the values [3, 7, 3, -1, 2, 3, 7, 2, 15, 15] and [-5, 15, 2, -1, 7, 15, 36] respectively, your function should return 4 because the elements -1, 2, 7, and 15 occur in both lists. Use one or more sets as storage to help you solve this problem. Do not modify the lists passed in.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
