t.write(state_data.state)
instead of this you can also write t.write ( user_answer ) which will print the name of the state only. And problem is in your list() which you got the 2 answer.