Question: def portfolio _ intersection ( portfolio 1 , portfolio 2 ) : # Convert the lists to sets set 1 = set ( portfolio 1

def portfolio_intersection(portfolio1, portfolio2): # Convert the lists to sets set1= set(portfolio1) set2= set(portfolio2) # Find the intersection of the two sets intersection = set1 & set2 # Convert the intersection set back to a list intersection_list = list(intersection) return intersection_list

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!