Store values without duplicates and add or remove them later. Equal values appear only once: True, 1 and 1.0 are equal. Items must be usable as dictionary keys; a list, dictionary, set or tuple containing one of them is rejected. Do not rely on iteration order.
Syntax
set(iterable=(), /)Returns
Example
seen = {1, 2, 2}
seen.add(3)
if 2 in seen:
text(str(seen))