Method signature:
intersection(anotherSet_in)
Method overview:
- The intersection of two sets is given by this method which selects the elements that are common to both the sets.
Parameters:
anotherSet_in - The second set from which common elements are drawn along with the current/this set, to form the intersection set
Example:
# Example Python program that creates an intersection of two sets # Set 1 # Set 2 # Set 1 ∩ Set 2 |
Output:
Intersection of two sets: {'Gear', 'Engine', 'Wheels'} |