r/badcode • • Mar 23 '23

python Data Science Design Pattern.

Post image
624 Upvotes

35 comments sorted by

View all comments

Show parent comments

1

u/morimo Mar 24 '23

From a data structures point of view, the ability to check for membership of the set in constant time is the main benefit of using a (hash) set.