Question: a)Write a python function that takes two lists as input and returns a list of common elements of the input lists. Function signature - def
a)Write a python function that takes two lists as input and returns a list of common elements of the input lists.
Function signature - def common_elements(list1:list, list2:list)->list:
b)What if the size of one of the input lists is way smaller than the other list ? Would you solve the problem differently ,if so how?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
