public symmetricDifference(other as HashSet<T>) as HashSet<T>:
Returns a new set containing elements present in exactly one of the two sets.
| Parameter | Description |
|---|---|
other | Elements to compare with this set. |
A new hash set containing the symmetric difference.
import klyn.collections
result = {1, 2, 3}.symmetricDifference({3, 4})
assert result.size == 3
assert 3 not in result