Python‎ > ‎frozenset‎ > ‎

frozenset.difference()

http://www.adilwaseem.com/

Introduction
Return the difference of two or more sets as a new set.

Syntax
frozenset.difference()

Parameters
iterable

Example
The method returns the difference between the set.
x=frozenset({1,3,4,5})
y=frozenset({3,4,6})
z=frozenset.difference(x,y)
print(z)

>>> 
frozenset({1, 5})
>>>

Comments