๐งฐ Collections & Stdlib Toolbox
Sets & Set Algebra
Unique members, fast membership, union / intersection.
Sets store **unique** items with O(1) membership checks. Use them to dedupe and to do set algebra: union (|), intersection (&), difference (-), symmetric difference (^).
a = {1, 2, 3}
b = {3, 4, 5}
print(a | b, a & b, a - b, a ^ b)