Function Details: intersection_update

Description


Update the set with the intersection of itself and another.


Extended Description


The intersection_update() method updates the set, keeping only elements found in it and all specified iterables. It can take multiple iterables as arguments. This method modifies the original set in-place and does not return a value. It's equivalent to using the &= operator on sets.


Function Signature


set.intersection_update(*others: Iterable) -> None

Module: set

Class: set

Parameters



Parameter List


  • other: Iterable

Return


This method doesn't return a value (None).


Return Type


None

Output

Explanation

This example shows how intersection_update() modifies the original set.