Question: No chatgpt, no AI please : Write a function named get _ common _ elements that accepts two lists as parameters. The function will return

No chatgpt, no AI please : Write a function named get_common_elements that accepts two lists as parameters.
The function will return a new list of all elements that are common to both lists. The
new list should not have any duplicate values in it (only unique values). Note that the
lists don't need to be the same length, and one or both could be empty lists.
Example Executions
alist =[]
blist =[]
print(get_common_elements(alist, blist)) # prints []
alist =[]
blist =[1]
print(get_common_elements(alist, blist)) # prints []
alist =[1,3,5]
blist =[1,5]
print(get_common_elements(alist, blist)) # prints [1,5]
alist =[1,3,5]
blist =[2,4,6]
print(get_common_elements(alist, blist)) # prints []
alist =[9,7,2,4,6,8,12,0,9]
blist =[2,4,0,9,1,7,4]
print(get_common_elements(alist, blist))# prints [9,7,2,4,0]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!