Function Details: difference_update

Description


Removes all elements of another set from this set.


Extended Description


The difference_update() method removes all elements from the set that are also present in the specified iterable(s). 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.difference_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 difference_update() modifies the original set.