/* ............... START ............... */
# Define two sets
set1 = {1, 2, 3, 4, 5}
set2 = {3, 4, 5, 6, 7}
# Method 1: Using the intersection method
common_items_method1 = set1.intersection(set2)
# Method 2: Using the & operator
common_items_method2 = set1 & set2
# Display the common items
print("Common items using intersection method:", common_items_method1)
print("Common items using & operator:", common_items_method2)
/* ............... END ............... */
Common items using intersection method: {3, 4, 5}
Common items using & operator: {3, 4, 5}