solutions

Set Operations (Intersection)

Create a function that will return a set of all the common elements of two lists.

list_1 = [1, 5, 6, 4, 8]

list_2 = [1, 6, 10, 5]

all_common_elements(list_1, list2) #{1, 5, 6}

The function should additionally check to see that the parameters are list objects. If they aren't, the function should return a string that says "Params not of type 'list'".

Test Cases

tests

[]