If we have small sequence constants in our code, is it best practice to write them as tuple rather than as a list? Or does it not really matter?
e.g. ORDER_TYPES = (1, 2, 3)
vs ORDER_TYPES = [1, 2, 3]
And when we intend to use inclusion operations against that sequence, does it make sense to store as a set?
e.g.
ORDER_TYPES = {1, 2, 3}
order_type = 1
if order_type in ORDER_TYPES:
...
Are there any actual speed/space benefits to storing as tuple vs list, or as a set, when the sequences are small like this? I know this falls into the realm of over-optimizing but just wondering what is actually considered best practice.