Question: def portfolio _ intersection ( portfolio 1 , portfolio 2 ) : # Convert the lists to sets set 1 = set ( portfolio 1
def portfoliointersectionportfolio portfolio: # Convert the lists to sets set setportfolio set setportfolio # Find the intersection of the two sets intersection set & set # Convert the intersection set back to a list intersectionlist listintersection return intersectionlist
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
