I have some set of states.
my currently code:
STATE_0, STATE_1, STATE_3, STATE_4, STATE_5 = range(5)
Each time I need to add state, I have to do two things: change state and change range. This is error-prone. So I wrote this code to minimize it. Is this the best approach? Of course, I can create a dictionary or some other structure, but I think it will not be a "pythonic way" and not the shortest way.
STATE_0, STATE_1, STATE_3, STATE_4, STATE_5, *_ = range(1000)