Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

Students also viewed these Databases questions