This article shows how to implement the set built-in at the expense of a dictionary.
Whenever I create something new, I share it with my mailing list of loyal readers. You can subscribe it too!