2. Write a python program to find common items from two
lists.
#
input
#
color1 = "Red", "Green", "Orange",
"White"
#
color2 = "Black", "Green", "White",
"Pink"
#Solution
color1 = "Red", "Green", "Orange", "White"
color2 = "Black", "Green", "White", "Pink"
print(set(color1) & set(color2))
No comments:
Post a Comment