Aug 6, 2023
But you will never notice the difference 99 times out 100.
And searching in small lists or tuples is often faster than searching in small sets, because the proportionality constant in that O(1) is quite large...
In particular, constructing a set is significantly slower than constructing a list or tuple.