This is not the real logic of my program, just a simplified version of it. Any help will be really appreciated.
My question is I am maintaining a state like this:
next_state = (state,self.visited_states)
# where self.visited_states = (False, False)
# I want the state to be in this form ((1,1),(False, False))
I need to change the boolean values to True when one of the state is visited. So I was trying something like this:
self.visited_states[0] = True.
I got an error as follows:
TypeError: 'tuple' object does not support item assignment