Write a Python program to find common items from two lists. Example: # input# color1 = "Red", "Green", "Orange", "White"# color2 = "Black", "Green", "White", "Pink"# output# {'Green', 'White'}
Topic: Write a Python program to find common items from two lists. Example: # input# color1 = "Red", "Green", "Orange", "White"# color2 = "Black", "Green", "White", "Pink"# output# {'Green', 'White'}
Solution
color1 = "Red", "Green", "Orange", "White" color2 = "Black", "Green", "White", "Pink" print(set(color1) & set(color2))
List all Python Programs